home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Information
/
THINK C Digest
/
1992
/
92-08
< prev
next >
Wrap
Text File
|
1995-12-31
|
167KB
|
4,542 lines
Path: ucivax!gateway
From: taihou@iss.nus.sg (Tng Tai Hou)
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <9208010228.AA16972@iss.nus.sg>
Newsgroups: fa.think-c
Lines: 7
Date: 1 Aug 92 02:27:06 GMT
This great. Please post your code and summaries.
It would help the net a great deal.
Thanks.
Tai Hou
Singapore
Path: ucivax!gateway
From: k044477@hobbes.kzoo.edu ("Jamie R. McCarthy")
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <9208011646.AA02171@hobbes.kzoo.edu>
In-Reply-To: <9207312057.AA23327@kona.cs.ucla.edu>; from "Tom Johnson" at Jul 31, 92 8:57 pm
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 60
Date: 1 Aug 92 16:44:39 GMT
> I've got the drawing sync'd to a VBL task and everything works great in a
> situation like this:
>
> do {
> DrawNextFrame();
> } while (!Button());
>
> of course. But when I put it into a real event loop:
> [code removed]
> I get all sorts of little starts/stops/pauses in the animation, as the mac
> gives time to background processes. And it's certainly not acceptable for
> a fast arcade-style game.
>
> How do other game authors handle it? Do you not give time to bkgnd processes?
> Just let downloads timeout? Or is there some simple idea that's gone by
> me completely?
Well, there's no easy way around it. If you need ten minutes of solidly
smooth animation at a constant 20 fps, then you're simply not going to
be able to call WNE.
However, there can be ways around it if your requirements are a little
less stringent. And it's very nice to know that downloads can go on
while playing, so giving time to background processes _is_ a goal worth
striving for.
Start from the assumption that your game takes priority, and work your
way towards being polite. The first step is to not call WNE every time
through the event loop. There's no reason to call it more frequently
than ten times a second. And you can probably do just fine calling it
only once or twice a second.
(Keep in mind, though, that WNE only gives time to _one_ background
process at a time. The worst-case scenario would be when the user has
twenty apps running, one of which is downloading with Kermit (which
requires confirmation after each send) in 128-byte packets. If you call
WNE once a second, the download will proceed at 128 bytes every twenty
seconds.)
My animation, for example, doesn't have a constant frame rate. I've set
it up to hog the CPU whenever an frame needs to be displayed within the
next two ticks, and to drop into the main event loop whenever the next
frame is three or more ticks away. There's also an override, so that it
will never go more than n seconds without dropping into the main event
loop. (I have n set at 3, but it doesn't work well for 5-second video
clips. I think I'm going to change it so that it will initially go for
ten seconds without calling WNE, and then require the call every three.)
> This is just a little throw away freeware
> game, so I'm trying to get as much done as I can as quickly as possible. Has
> anyone ever written a sample arcade game and given away the source? Something
> I could base mine upon?
Ingemar Ragnemalm has written a Sprite Animation Toolkit that was in
preliminary testing last I knew. You might want to contact him and get
ahold of it.
--
Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
The essence of OOP: "After some hacking, I finally got the program to
work, but I'm still not sure why." - David Marcovitz (marcovitz@uiuc.edu)
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <Mailstrom.B54.38003.15089.de19@umail.umd.edu>
In-Reply-To: Your message <9208011646.AA02171@hobbes.kzoo.edu> of 1 Aug 92
16:44:39 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 13
Date: 1 Aug 92 23:20:08 GMT
Rather than make presumptions about what the user wants you to do, why not give
the user a chance for some input? decide on a strategy for moderating your games
hogishness, and have a preference dialog for its parameters.
You really cant outguess what your users will prefer here, some will want to
game at full bore, others might be killing time during some other lengthy but
critical task.
The studly app wins reviews and influences buyers when it shows such
flexibility.
Dana S Emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: tj@cs.ucla.edu (Tom Johnson)
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <9208012115.AA10252@kona.cs.ucla.edu>
In-Reply-To: <9208011646.AA02171@hobbes.kzoo.edu>; from "Jamie R. McCarthy" at Aug 1, 92 4:44 pm
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 16
Date: 2 Aug 92 00:59:06 GMT
Hi Jamie-
This is going to be a fast arcade-type game, but I think I can throw in a
WNE perhaps during explosions or something. Thanks for your ideas. I may
have some more questions about your method, when I'm thinking a bit more clearly
(only a few hours of sleep last night).
>
> Ingemar Ragnemalm has written a Sprite Animation Toolkit that was in
> preliminary testing last I knew. You might want to contact him and get
> ahold of it.
Sounds interesting. Do you have an email address?
Thanks-
Tom
Path: ucivax!gateway
From: tj@cs.ucla.edu (Tom Johnson)
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <9208020004.AA14438@kona.cs.ucla.edu>
In-Reply-To: <Mailstrom.B54.38003.15089.de19@umail.umd.edu>; from "Dana S Emery" at Aug 1, 92 11:20 pm
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 6
Date: 2 Aug 92 00:59:07 GMT
Thanks Dana
I like the idea. I think I'll put a "niceness" control in the preferences
and let people choose.
Tom
Path: ucivax!gateway
From: jmunkki@vipunen.hut.fi (Juri Munkki)
Subject: WaitNextEvent in games
Message-ID: <199208012139.AA35990@vipunen.hut.fi>
Newsgroups: fa.think-c
Lines: 24
Date: 2 Aug 92 01:01:23 GMT
I'm soon going to release the source code for what is known as
"STORM". I guess the think-c archives might be a nice central
distribution site for them. STORM (I really should call it
Arashi, since that's the new name, except that I didn't have
the time and energy to rewrite the title animations completely)
uses GetNextEvent and still maintains a 20 frames per second
animation rate even under system 7.0 with Finder running.
Note that open control panels use huge amount of background
time. Terminal programs and other such programs also usually
require some background time. Since the user can fairly easily
control the amount of background activity, I prefer giving
time to other processes.
Ben Haller (the author of Solarian) has the opposite approach
and he uses the OS event manager. The OS Event manager does not
give time to other processes.
A compromise might be in order. You could let the user choose
how often background time is given and use the OS event manager
for getting actual event information.
Juri Munkki
jmunkki@hut.fi
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca ("David A. Denboer")
Subject: Modeless Dialogs
Message-ID: <9208020459.AA13492@ccu.UManitoba.CA>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 25
Date: 2 Aug 92 05:00:09 GMT
I post this again, because it is very important that I get it to work this
week. When using modeless dialogs in THINK C (created in ResEdit), THINK C
displays the wrong type of window (It displays a ZoomDocProc when I want a
NoGrowDocProc) To post the dialog on the screen, I use :
if (gModelessDialog == NIL) {
gModelessDialog = GetNewDialog(rEnterDialog,NIL,(WindowPtr) -1);
}
SelectWindow(gModelessDialog);
SetPort(gModelessDialog);
ShowWindow(gModelessDialog);
Now the window type is defined properly in ResEdit, and the same resource works
fine from THINK Pascal.
Any suggestions?
--
David A. den Boer
Musi Computer Products
Macintosh Users Show Intelligence
umdenbo0@ccu.umanitoba.ca
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca ("David A. Denboer")
Subject: QuickTime programming
Message-ID: <9208021007.AA04466@ccu.UManitoba.CA>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 31
Date: 2 Aug 92 10:07:16 GMT
When using THINK C 5.02 for QuickTime programming, I have a few problems.
I am trying to use the standard controller for viewing my movies, but I
can't get the controller to properly update itself.
I put the statement MCIsPlayerEvent in my mainloop like so:
while (!gQuit) {
gotEvent = WaitNextEvent(everyEvent, &theEvent, MAXLONG, cursorRgn);
MoviesTask(theMovie,0);
MCIsPlayerEvent(myMovieController, &theEvent);
if (gotEvent) {
if (theMovie != nil)
DisableItem(GetMHandle(mFile), iPlay);
HandleEvent(&theEvent);
}
But the controller never gets updated. It just stays right at the beginning
of the movie, or moves just a little at the beginning of the movie.
Am I calling this wrong, or should I be calling it at a different place in
my program.
Any Help would be greatly appreciated,
--
David A. den Boer
Musi Computer Products
Macintosh Users Show Intelligence
umdenbo0@ccu.umanitoba.ca
Path: ucivax!gateway
From: morley@clam.rutgers.edu (darin s morley)
Subject: LZW Compression Revisited
Message-ID: <CMM-RU.1.2.712871424.morley@clam.rutgers.edu>
Newsgroups: fa.think-c
Lines: 38
Date: 3 Aug 92 19:50:36 GMT
I'm responding to a posting which I saw here a few weeks ago about the LZW
compression algorithm. I came across some interesting legal information on it
this past weekend. As some of you may know, the TIFF raster image format
optionally supports LZW compression. At least it did. While reading through
Revision 6.0 of the TIFF format I came across this:
"When LZW compression was added to the TIFF specification, in Revision 5.0, it
was thought to be public domain. This is, apparently, not the case.
"The following paragraph has been approved by the Unisys Corporation:
"'The LZW compression method is said to be the subject of United States patent
number 4,558,302 and corresponding foreign patents owned by the Unisys
Corporation. Software and hardware developers may be required to license this
patent in order to develop and market products using the TIFF LZW compression
option. Unisys has agreed that developers may obtain such a license on
reasonable, non-discriminatory terms and conditions. Further information can
be obtained from: Welch Licensing Department, Office of the General Counsel,
M/S C1SW19, Unisys Corporation, Blue Bell, Pennsylvania, 19424.'
"Reportedly, there are also other companies with patents that may affect LZW
implementors."
-- _TIFF_Revision_6.0_, Section 13: LZW Compression, p. 57.
Names of the other companies were not provided, so your guess is as good as
mine on that one.
From the above, "Software and hardware developers may be required..."
Translation: "If your application uses LZW and is a miserable failure, we don't
care, but if it's a success, then we want a cut of the profits."
"tiff6.sea" can be obtained at the usual haunts (sumex, umich, et al.), but it
comes in the most user hostile format possible. It is an ASCII text PostScript
file, weighing in just over a meg, at 1046k (after decompression).
morley@clam.rutgers.edu
morley@clam.rutgers.edu
Path: ucivax!gateway
From: k044477@hobbes.kzoo.edu ("Jamie R. McCarthy")
Subject: Ragnemalm's email address
Message-ID: <9208032128.AA16667@hobbes.kzoo.edu>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 5
Date: 3 Aug 92 21:26:52 GMT
Ingemar Ragnemalm's email address is ingemar@isy.liu.se.
--
Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
"I don't think we should have to have them wandering the streets
frightening women and people." - Pat Buchanan
Path: ucivax!gateway
From: tj@cs.ucla.edu (Tom Johnson)
Subject: Re: WaitNextEvent in games
Message-ID: <9208030503.AA05577@kona.cs.ucla.edu>
In-Reply-To: <199208012139.AA35990@vipunen.hut.fi>; from "fa.think-c-outbound-request@ics.uci.edu" at Aug 2, 92 1:01 am
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 21
Date: 4 Aug 92 00:55:10 GMT
Hi Juri-
It's great to hear that STORM/ASAHI source is going to be available soon. I'm
really looking forward to taking a look at it. I'm most impressed with the
sound toolkit you released earlier, and I was planning on using it in
my application.
I think you've hit on the solution: compromise, let the users decide how
friendly to be, and use OSEventAvail for fastest possible speed too.
Now I'm feeling impatient. How much longer do you think we'll have to wait
to see the source in the Think-C archives?
.
It's the help of people like you that make the internet such a valuable
resource.
Tom
ps, besides, Tempest is my girlfriend's favorite arcade game of all time...
maybe now she won't be dropping so many quarters int the arcades :)
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca ("David A. Denboer")
Subject: EnterMovies and Events
Message-ID: <9208042324.AA17982@ccu.UManitoba.CA>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 22
Date: 4 Aug 92 23:24:23 GMT
I'm looking at ways of enhancing my QuickTime Application, and need a few
pointers. If a user is playing a movie, and then decides to Suspend the
application, should I call ExitMovies() on a suspend Event, and
EnterMovies() on a resume event (assuming that there is a movie to be played)
Is this possible, or should I forget about it!
Another thing...Should I call ExitMovies() whenever the user opens the About...
during movie play ? EnterMovies() causes the Sounds (beep etc) to not work
when an app calls EnterMovies()... So should I call ExitMovies() whenever
there is an event not related to my movie?
So many questions, so little documentation (I would like a QuickTime book NOW)
--
David A. den Boer
Musi Computer Products
Macintosh Users Show Intelligence
umdenbo0@ccu.umanitoba.ca
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: apple.com (duh)
Message-ID: <01GN73KWSQUQ91WVOY@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 4
Date: 5 Aug 92 00:43:24 GMT
X-Envelope-to: think-c@ics.uci.edu
i have ftp'd to apple before, but lately i get 530 User anonymous unknown.
to that i say "off course im unknown, im anonymous."
what do you think?
aaron
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: RE: apple.com (duh)
Message-ID: <920805111010.2020ed5c@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 4
Date: 5 Aug 92 15:54:02 GMT
X-Vmsmail-To: SMTP%"fa.think-c-outbound-request@ics.uci.edu"
Try ftping to "ftp.apple.com" I don't think that "apple.com" is accepting
anonymous ftps.
Anyone have more info?
Path: ucivax!gateway
From: yjc@po.cwru.edu
Subject: Some Think C things I've been thinking about
Message-ID: <9208051917.AA25679@pop.CWRU.Edu>
Newsgroups: fa.think-c
Lines: 31
Date: 5 Aug 92 19:17:45 GMT
Threads:
Would it be a good idea to implement threads as a Class? How would you go
about doing it? Has it already been done? Is it worth the bother? I was
thinking of implementing threads as a class in the following fashion:
1) A CSpindle Class (to spin off threads) to handle CThreads. This Class
contains a list of all CThreads. It's init method will install a CChore
object that calls yield() during idle time (perhaps once every X
ticks).It's dispose method will be responsible for ending all the current
threads and removing the CChore object. It's spin() method will be
responsible for registering Cthreads in it list and forking them.
2) A CThread Class (Does this have to be a direct or indirect class?). The
init method will call newthread() to allocate a thread handle (should this
be private, protected or public data?). It has a custom method to handle
customisation, and a fork method to handle the actual forking and calls its
task method to do the actual work (maybe fork itself should do the actual
work instead of calling). It's dispose method kills the thread and
deallocates the space used.
Hex Map:
My friend and I would like to do a small hex map based game. How should
we go about constructing the map display? Would it be possible to write a
custom LDef for a Hex Map or to modify the CTable Class to display
Hexagonal Lists?
---
The Evil Tofu ("I thought I understood the Mac ...")
"No Lah! Sure or not one! Terriblur lah! Kiasu one! Wah Low Eh! Alamak!"
Path: ucivax!gateway
From: k044477@hobbes.kzoo.edu ("Jamie R. McCarthy")
Subject: An access quandry
Message-ID: <9208052000.AA27995@hobbes.kzoo.edu>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 34
Date: 5 Aug 92 19:58:51 GMT
What if I try to access a method that's protected in the run-time class,
but public in the compile-time class?
For example, if I have:
class CPublicFoo : public indirect {
public:
void doMethod(void);
} ;
class CProtectedFoo : public CPublicFoo {
protected:
void doMethod(void);
}
void CSomeOtherClass::doPublicMethod(CPublicFoo *theFoo)
{
theFoo->doMethod(); // this looks good to the compiler
}
void CSomeOtherClass::doProtectedMethod(CProtectedFoo *theFoo)
{
doPublicMethod(theFoo); // this is insidious
}
What will happen!?!
I'm guessing a runtime error--method not found--but I dunno...
--
Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
The essence of OOP: "After some hacking, I finally got the program to
work, but I'm still not sure why." - David Marcovitz (marcovitz@uiuc.edu)
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: INITs, cdevs, patches
Message-ID: <01GN8BMEG1UQ96VLCW@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 5
Date: 5 Aug 92 22:10:07 GMT
X-Envelope-to: think-c@ics.uci.edu
I want to write an INIT/cdev whatever, the thing i really want to know
is how to patch traps. I have inside mac I,II,III,V, and think ref but
can't seem to get a lead. anything that could get me started on system
stuff would be mucho apreiciated.
aaron
Path: ucivax!gateway
From: tsang@isi.com ("Kam C. Tsang")
Subject: please add me to your list
Message-ID: <9208060326.AA16350@phecda>
Newsgroups: fa.think-c
Lines: 6
Date: 6 Aug 92 03:29:39 GMT
----------------------------+-----------------------------
Kam Tsang | User Interface Group
(408) 980-1590 x 275 | Integrated Systems, Inc.
(408) 980-0400 [Fax] | 3620 Jay Street
tsang@isi.com | Santa Clara, CA 95054
----------------------------+-----------------------------
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: apple.com (duh)
Message-ID: <Mailstrom.B54.10229.9528.de19@umail.umd.edu>
In-Reply-To: Your message <920805111010.2020ed5c@vax.cs.hscsyr.edu> of 5 Aug
92 15:54:02 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 14
Date: 6 Aug 92 04:50:44 GMT
Yes, the site name is
ftp.apple.com
and, of course, you must sign on as anonomous with your *verifyable* mail
address as the password. Seems Apple is actually verifying the password, which
may trip up people who cant type blindly.
IMHO, any program which offers up 'anonomous' as a default acount ought to be
clever enough to use a non-blinded password typing protocol when a user accepts
the default.
Dana S Emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: laborde@imag.fr (Jean-Marie Laborde)
Subject: Unwanted events and THINK C Debugger 5.0.2
Message-ID: <9208061226.AA11865@imag.imag.fr>
Newsgroups: fa.think-c
Lines: 30
Date: 6 Aug 92 12:27:55 GMT
I have encoutered a strange behavior a on midle sized project (1 Meg).
When running under the control of THINK C Debugger very offen after a
FlushEvents(...) [even after FlushEvents(everyEvent,0)!]
EventAvail(mDownMask,&evenement) reports an event even if
there is no mouseDown event at all.
The same happens with WaitNextEvent(....).
It works normally (ie flawless) when turning the debugger off or when
building a standalone application.
I use Think C 5.0.2 & Debugger 5.0.2 on a Quadra 950 but the same
happens on a regular Qudar or a II fx.
I tried to remove all INITs but the strange behavior is still there.
Does have somebody any ideas or how can I fix the problem?
Thank you!
Jean-Marie Laborde laborde@imag.fr
Laboratoire de Structures Discretes et de Didactique - IMAG
Universite Joseph Fourier - CNRS BP 53x 38041 Grenoble cedex
FRANCE
(33) 76 51 46 10 (sec 76 51 46 16) (fax 76 51 45 55)
Path: ucivax!gateway
From: umdenbo0@ccu.umanitoba.ca ("David A. Denboer")
Subject: CDEV, INIT
Message-ID: <9208061821.AA01952@ccu.UManitoba.CA>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 491
Date: 6 Aug 92 18:22:58 GMT
If you don't want the content of the letter just trash it!
It contains sample code for a CDEV, and an INIT, downloaded from UMIC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JLD@Jl[YEB
$mhkqTYXLebKk2IEp[LP$&H)QP8G13CXB2<bb8a,RN+-ip(3K04d)E$r`aAL*T
9(6N'E'$hrDq!'`C3F2R2UlD,[T83Pikf3T!!Ca14DJRID"#M*D$Jac),kZ"D+e(
3KX*$S5bE)'qh,#B-`PC"I9`,D,S33ffZ3KU-fM$44Q6bDaqd#&'5KP"f!ad),l3
)8C,Q%X))jN&pA!Y&N!$M6lFbq)DM0S`epSm!kF'S03ad)E$E4Gp+L&(Ljj!!QSk
%0Kq6dkEif%-E(lFX*Jc#9N&pA!YSXc&)L*b19Z0YpUZ8qX(`3+#I*)&SZ)QYN!#
N'F6N@S*hfM`%c@K)Bk%0KYSSLF6CbQb&)6YRL6+5I,qhl3)8C,R*eJq#"36j*!1
K"@Li8iR)Y36[YI!$B-S1$(3J[YE5KQEpNp1Q&NUfLaN%$(&(PN&NVlA`!f$+$Ja
d)+fLlDRXJMIIYE"XZEpNp1Qq0K$'aY&M)+CZ1)3aXIYqdHKL[%biBk%0Kqdq'%-
S1(cReIfMdSHM`fCpj""2Yq6dkB@5[Y(SBVa-Z'1K$BIY`$Erq+5qG'H&Ca*fhq1
R(X!fUiTpX1AQfZ3("SiEb([QGb[AE2"ZYdqf(,cEA*il)2QGb[AE2C!!p[N)8%e
K0!,H`8NS+k&KVUT5%*M1fS`TR+brHD%GV#LrJNXL6#,3!#iFCV*'D#c,A,KGE+Y
X492##"A+U)$D5h&cr9*)CE)E,d!T&+Nj)[Pa4qhb-Kj&99L3!0SK3@dm"$DK2Tj
AL['bG3R$De0'DK`$,+UQ&8[1@+P#C)MXJ2QU%GAa[c!8LhPaEc33c[Im(rJY3&"
&EQ3pY`!!!:
--
David A. den Boer
Musi Computer Products
Macintosh Users Show Intelligence
umdenbo0@ccu.umanitoba.ca
Path: ucivax!gateway
From: wadew@ducvax.auburn.edu (Wade Williams)
Subject: Strange Think C problems
Message-ID: <9208062210.AA07425@accs.duc.auburn.edu>
Newsgroups: fa.think-c
Lines: 30
Date: 6 Aug 92 22:08:40 GMT
I'm using THINK C 5.0.2 on a Quadra 700 with 8 megs of RAM, 32-bit
addressing off, VM off and TuneUp 1.1.1.
The problem is, the debugger keeps crashing in between the time the program
finishes linking and the debugger's windows appear on the screen.
After such a crash, double-clicking the project file results in a message
that "the application that created it could not be found." Double-clicking
a source file results in the message "..could not be used because it is in
use." Double-clicking the THINK C applciation and opening the project sets
everything straight again until the next crash.
Does anyone have any idea what's causing these crashes? Is there a new
version of THINK C for the Quadras? I've experienced this problem with no
INITs. Again, it happens before the debugger finishes loading, so I'd
think that would rule out a problem with my code, wouldn't it?
Another interesting note: trying to open a log file with MacsBug 6.2.2
usually crashes the machine completely, the only escape is pressing the
restart button.
Any help greatly appreciated.
-------------------------------------------------------------------
Wade Williams "One likes to believe in the freedom
User Services Specialist of music, but glittering prizes and
Academic Computing Services endless comprimises shatter the
Auburn University illusion of integrity."
wadew@ducvax.auburn.edu (N. Peart of Rush)
--------------------------------------------------------------------
Path: ucivax!gateway
From: king@acpub.duke.edu (King Rhoton)
Subject: Re: Strange Think C problems
Message-ID: <9208070140.AA20788@raphael.acpub.duke.edu>
Newsgroups: fa.think-c
Lines: 4
Date: 7 Aug 92 01:41:01 GMT
I think you must have a corrupted system. I use think C 5.0.2 with no problems
on a quadra 900, 32-bit on, caches on, and over 54 happily ce-existing
extensions. ^^ co
King
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: apple.com (duh)
Message-ID: <Mailstrom.B54.20203.-3114.de19@umail.umd.edu>
In-Reply-To: Your message <9208062143.AA15614@gaea.lpl.arizona.edu> of Thu, 6
Aug 92 14:43:24 MST
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 17
Date: 7 Aug 92 01:49:08 GMT
oops,
it has been pointed out to me that I mispealt 'anonymous' in my previous
diatribe, for which I must appologize, that was a most egregious error.
I suppoose I could blame the lack of a spelling checker in Mailstrom, but then I
would probably end up with the task of implementing it, so I wont (hope adam
isnt reading this :-).
Luckily, my proclivity to mistype that word doesnt usually block my access to
stuff, because the Mac program I use for ftp work (HyperFTP) has spoiled me by
provideing it as a default, thus saveing me the trouble of mistyping it.
GUI GUI gumdrops.
Dana S Emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Graf3D Library.
Message-ID: <920807105615.20201a6f@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 6
Date: 7 Aug 92 14:58:45 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
I have noticed the "Graf3D" library included with Think C, but I can not
find any documentation about it. Where could I find something about it,
and some sample code perhaps?
Thanks...
Will
Path: ucivax!gateway
From: chuck@ksr.com
Subject: Cool Black Menu (tm) - now I know
Message-ID: <9208080141.AA04193@z8.ksr.com>
Newsgroups: fa.think-c
Lines: 23
Date: 8 Aug 92 01:40:46 GMT
You may recall the Cool Black Menu (tm) question I posted two weeks ago. I
found what the problem was.
Some time ago I have defined some menu entries as having colors (ResEdit
automatically created a corresponding 'mctb' resource). Then at a later
time I have redefined some menu entries, and removed the color from some
entries that had it before. However, I did not delete the corresponding
'mctb' resources that were created by ResEdit.
I do not fully understand why that caused my problem, and whether this is a
QuickDraw or TCL's CBartender issue. But ever since I removed the extra
'mctb' resources, CBM is gone.
Thanks to all the kind netters who answered my original post. None had
guessed whodonit, but a few people found this feature cool indeed and
wanted to know how to do it. I could not tell you how to do it in a
controlled way, but you have enough info to get started. Tell the rest of
us if you find anything interesting.
Chuck Shavit
chuck@ksr.com
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: RE: INITs, cdevs, patches
Message-ID: <920806074717.20200731@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 21
Date: 8 Aug 92 16:00:53 GMT
X-Vmsmail-To: SMTP%"fa.think-c-outbound-request@ics.uci.edu"
This works with tool traps:
oldTrapAdd = NGetTrapAddress(Trap,ToolTrap);
NSetTrapAddress((ProcPtr),Trap,ToolTrap);
You call the "oldTrapAdd" varible in your (ProcPtr) to call
the orignal. Like :
CallPascal ( <Varibles>, oldTrapAdd );
There is somthing slightly different with OSTraps... the
varibles arn't passed on the stack, or something... (I do all
of my programming in C, and know no assembler.)
Anyone else?
(I also have a simple INIT w/source that every time TEIdle is
called, it "shakes" the mouse randomly around the screen. If
you want a copy of the source... just mail me.)
schenkl@vax.cs.hscsyr.edu
PS. No, I do not know why I wrote it.
Path: ucivax!gateway
From: caprio@u.washington.edu (Robert Olsen)
Subject: Bug in CPane::AdjustToEnclosure(...
Message-ID: <Pine.3.03.9208081142.A19289-b100000@hardy.u.washington.edu>
Content-Type: TEXT/PLAIN; charset=us-ascii
Mime-Version: 1.0
Newsgroups: fa.think-c
Lines: 28
Date: 8 Aug 92 19:26:36 GMT
I think I have spotted a bug in CPane::AdjustToEnclosure(...)
Remember, AdjustToEnclosure is called for every sub-view of a Pane when its
size is changed with ChangeSize(..)
The bug comes alive when you have a Pane with size FIXED in one dimension
and size ELASTIC in the other. When its enclosure changes sizes in both
directions, the AdjustToEnclosure has to move and re-size the sub-panes.
The bug exists because ChangeSize is smart and will try to validate the
portion of the Pane that is in the old aperture and the new one.
The problem is, when we call Offset(..) first, the region it has
invalidated will get re-validated by the next call of ChangeSize(..)
So, I propose to fix the bug, you simply change the order of the two.
This way, you still get the pretty effect of ChangeSize(..)'s validation
when there is no MOVE or Offset(..)
The logic of the routine reads:
if (moved) { //moved is either horiz of vert
if (sized) {
Offset(hOffset,vOffset,TRUE); //the bug... I propose changing order
ChangeSize(&delta,TRUE); //of Offset and ChangeSize here...
} else {
Offset(hOffset,vOffset,TRUE);
} else if (sized) {
ChangeSize(&delta,TRUE);
} else ...
Path: ucivax!gateway
From: spm2d@wilbury.cs.virginia.edu
Subject: Looking for a Think C implementation of sockets
Message-ID: <9208082100.AA09657@wilbury.cs.Virginia.EDU>
Posted-Date: Sat, 8 Aug 92 17:00:49 EDT
Newsgroups: fa.think-c
Lines: 11
Date: 8 Aug 92 21:01:17 GMT
What I currently want to do is to send some data from an SGI
(unix machine) to a Macintosh. Both will be running applications,
and it is possible that the Mac will also want to send data
back to the SGI.
Is there any publically available socket implementation written
in Think C?
Thanks,
Steve
Path: ucivax!gateway
From: odell@bu-it.bu.edu (Jim O'Dell)
Subject: Looking for a Think C implementation of sockets
Message-ID: <9208090430.AA09547@buitc.bu.edu>
In-Reply-To: spm2d@wilbury.cs.virginia.edu's message of 8 Aug 92 21:01:17 GMT <9208082100.AA09657@wilbury.cs.Virginia.EDU>
Newsgroups: fa.think-c
Lines: 13
Date: 9 Aug 92 05:25:16 GMT
What I currently want to do is to send some data from an SGI
(unix machine) to a Macintosh. Both will be running applications,
and it is possible that the Mac will also want to send data
back to the SGI.
Is there any publically available socket implementation written
in Think C?
-----
I'd be interested in any positive answers that you get.
Jim
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Sockets
Message-ID: <920809211135.20204144@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 10 Aug 92 01:14:05 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
A think-C sockets library w/ source has been put up in the incoming directory
at "ics.uci.edu". It seems to be the only copy left in the world, so please
take a copy if you need/want it.
(I'm not sure what the standard protocal for sending files to the list, but
some one requested this and I'm using this site as a drop-box. Someone please
mail me to tell me the correct proceedure.)
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Cursor Shake
Message-ID: <920810100735.20203a7e@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 6
Date: 10 Aug 92 14:10:11 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
My silly INIT that randomaly moves the cursor around when TEIdle is
called is now also in the imcoming directory. The code is awfull, and I
don't know it if will work under System 7, but it did under system 6.
It's all yours.
Path: ucivax!gateway
From: inei@dcs.gla.ac.uk (inei)
Subject: Console-like interface needed.
Message-ID: <9208101419.AA04000@hawaii.dcs.gla.ac.uk>
Newsgroups: fa.think-c
Lines: 13
Date: 10 Aug 92 14:19:03 GMT
I need a console-like (cshow) like interface for a program but with
the ability to install my own menus and use command-keys.
At the mement, when I use fopenc() and cshow(), I cannot use command
keys. I would also like to be able to resize and zoom the window.
Does anyone know if it can be done or has someone already done
something similar?
Mail: Nick Nei, Computing Science Dept.,
Glasgow Univ., 17 Lilybank Gardens,
Glasgow G12 8QQ, UK. Tel: (041) 339 8855 x 5457
ARPA: inei%uk.ac.glasgow.dcs@nsfnet-relay.ac.uk USENET: inei@cs.glasgow.uucp
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: Sources
Message-ID: <920811081725.20203d21@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 11 Aug 92 12:20:09 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
The name for sockets, for think c is :
/incoming/sockets-thinkc.hqx
The name for the silly init is :
/incoming/cursor-shake.hqx
Before I was able to do a directory listing, and I'm not sure why.
Good luck.
Path: ucivax!gateway
From: nagel@ics.uci.edu (Mark Nagel)
Subject: ARCHIVE: sockets and cursor-shake
Message-ID: <8857.713552918@ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: think-c-request@ics.uci.edu
Lines: 34
Date: 11 Aug 92 17:08:46 GMT
I moved the files SCHENKL@vax.cs.hscsyr.edu uploaded into the main
archive area. Here's his descriptions once again. Please reply
to the contributor if you have any questions about the contents of
these files.
/*****************************************************************************/
From: SCHENKL@vax.cs.hscsyr.edu
Date: 10 Aug 92 14:10:11 GMT
Subject: Cursor Shake
My silly INIT that randomaly moves the cursor around when TEIdle is
called is now also in the imcoming directory. The code is awfull, and I
don't know it if will work under System 7, but it did under system 6.
It's all yours.
[saved as: /mac/think-c/appl/cursor-shake.hqx; 7K]
/*****************************************************************************/
From: SCHENKL@vax.cs.hscsyr.edu
Date: 10 Aug 92 01:14:05 GMT
Subject: Sockets
A think-C sockets library w/ source has been put up in the incoming directory
at "ics.uci.edu". It seems to be the only copy left in the world, so please
take a copy if you need/want it.
(I'm not sure what the standard protocal for sending files to the list, but
some one requested this and I'm using this site as a drop-box. Someone please
mail me to tell me the correct proceedure.)
[saved as: /mac/think-c/appl/sockets-thinkc.hqx; 168K]
Path: ucivax!gateway
From: mdl@bintec.bintec.de (Mike Lyons)
Subject: Weird problems with THINK C 5.0.2
Message-ID: <9208111942.AA07957@bintec.bintec.de>
X-Mailer: ELM [version 2.2 PL11]
Newsgroups: fa.think-c
Lines: 72
Date: 11 Aug 92 19:10:27 GMT
Watch out, major use of bandwidth approaching...
Is THINK C 5.0.2 broken??
Below is an excerpt from a MacEnvy report for my machine:
Machine: Macintosh IIci
System: Version 7.0 (2808K)
Finder: Version 7.0
MultiFinder: File is not present.
Localized For: U.S./Canada (0)
File System: HFS (Hierarchical)
Debugger: Macsbug installed
RAM Cache: 512K, cache enabled
Current App: "Finder"
Monitors: 1 screen device
Main Screen: 640 x 480 pixels
Pixel Depth: 8 bits/pixel (color)
PRAM Status: Last write valid ($A8)
Modem Port: 9600 baud, D=8, S=2, N
Printer Port: 9600 baud, D=8, S=2, N y
I've also applied the System 7 Tuneup. I have 16 MB RAM,
but 32-bit addressing is off.
THINK C exhibits the following weirdness:
1. #pragma once appears to be fully broken, i.e. files are included twice
even though the #pragma is used, I had to resort to the
#ifndef _HEADER_H_ ... method.
2. According to the manual, option-click on the title bar of a source window
brings up a pop-up list of all files #included in that source file. Not!
2a. The same thing happens when I option-click on the title bar of the project
window (nix).
3. option-double click on an identifier name is supposed to beam down to
the place where that identifier is defined. Usually all that happens
is that the watch cursor flickers, and then nothing else happens. Is
this function unable to find definitions across multiple files? sigh.
4. I was attempting to port the sample code in the Apple MIDI Management
Tools 2.01 from MPW to THINK C. THINK C always complains (illegal cast)
when constructions like:
(Str255) CtoPStr (etc...);
show up. Does this typedef
typedef unsigned char Str255[256]
in Types.h have something to do with the problem?? :-(
5. This isn't a bug, but rather a complaint. Shouldn't multi-file searches
automagically sift through #included files as well (and bring them up in
the search checklist dialog at the beginning)? Would save a lot of time.
Mike
--
================================================================================
| Michael D. Lyons | Telefon: +49 911 996750 | EMail: mdl@BinTec.DE |
| BinTec Computersysteme | Telefax: +49 911 6880725 | |
| Willstaetter Strasse 30 | | |
| D-8500 Nuernberg 60 | | |
| GERMANY | | |
================================================================================
| BinTec --- UNIX Kommunikation ueber ISDN |
================================================================================
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: CTB Tools...
Message-ID: <920811155356.20205cce@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 2
Date: 11 Aug 92 19:56:31 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
Does anyone know where I can find some Comm. Toolbox tools and/or source to
them?
Path: ucivax!gateway
From: jdm@boulder.colorado.edu (James Meiss)
Subject: Please explain this trivial crash
Message-ID: <9208112137.AA10646@poincare.Colorado.EDU>
Newsgroups: fa.think-c
Lines: 51
Date: 11 Aug 92 21:33:49 GMT
Can someone explain to me why this simple code crashes with a bus
error under Think C 5.0.2?
******
#include <stdio.h>
#define ORDER 4
void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER]) /*Replaces
a by b */
{
register int i,j;
for(i=0;i<ORDER;i++)
for(j=0;j<ORDER; a[i][j] = b[i][j++]);
/****
If you replace the above with
for(j=0;j<ORDER;j++)
a[i][j] = b[i][j++];
then all is well
****/
}
main()
{
double T[ORDER][ORDER], U[ORDER][ORDER];
double a[ORDER],b[ORDER];
int i,j;
for(i=0;i<ORDER;i++)
for(j=0;j<ORDER;j++)
{
T[i][j] = 1.0;
U[i][j] = 0.2;
}
MatrixCopy(T,U);
printf("Done\n");
}
James D. Meiss
Program in Applied Mathematics (303)492-4672 office
University of Colorado, Boulder 80309-0526 -4668 secretary
-4066 FAX
jdm@boulder.colorado.edu
Path: ucivax!gateway
From: k044477@hobbes.kzoo.edu ("Jamie R. McCarthy")
Subject: Re: Weird problems with THINK C 5.0.2
Message-ID: <9208112146.AA08249@hobbes.kzoo.edu>
In-Reply-To: <9208111942.AA07957@bintec.bintec.de>; from "Mike Lyons" at Aug 11, 92 7:10 pm
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 51
Date: 11 Aug 92 21:44:37 GMT
> THINK C exhibits the following weirdness:
>
> 1. #pragma once appears to be fully broken, i.e. files are included twice
> even though the #pragma is used, I had to resort to the
> #ifndef _HEADER_H_ ... method.
You are using "#pragma once" right?
> 2. According to the manual, option-click on the title bar of a source window
> brings up a pop-up list of all files #included in that source file. Not!
It won't, if you haven't compiled the file successfully yet, or if all
the #included files are also in a precompiled header.
> 2a. The same thing happens when I option-click on the title bar of the project
> window (nix).
Dunno...
> 3. option-double click on an identifier name is supposed to beam down to
> the place where that identifier is defined. Usually all that happens
> is that the watch cursor flickers, and then nothing else happens. Is
> this function unable to find definitions across multiple files? sigh.
Actually, all it does is try to find the first occurence of the
selection, just a regular find. I believe it searches all the .h files
that an option-click will reveal--i.e., all headers that aren't also
precompiled.
> 4. I was attempting to port the sample code in the Apple MIDI Management
> Tools 2.01 from MPW to THINK C. THINK C always complains (illegal cast)
> when constructions like:
> (Str255) CtoPStr (etc...);
> show up. Does this typedef
> typedef unsigned char Str255[256]
> in Types.h have something to do with the problem?? :-(
Yup. Just write "(unsigned char *) CtoPStr(...)" instead. You can cast
to a pointer but not to an array.
> 5. This isn't a bug, but rather a complaint. Shouldn't multi-file searches
> automagically sift through #included files as well (and bring them up in
> the search checklist dialog at the beginning)? Would save a lot of time.
Quick way to do this: put "Mac #includes.c" or whatever your precompiled
header's source file is into your project. It'll add zero bytes of
object code, but you're guaranteed that clicking "Check all .h" in the
Multi-File Search dialog will really select _all_ .h files.
--
Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
Sure, I subscribe to alt.sex, but I only read it for the articles...
Path: ucivax!gateway
From: nagel@cigna.uucp ("Mark D. Nagel")
Subject: ARCHIVE: oops
Message-ID: <7234.713577735@cigna.com>
Newsgroups: fa.think-c
Reply-To: nagel@cigna.uucp
Organization: CIGNA FIRST, Irvine, CA
Lines: 6
Date: 12 Aug 92 00:10:39 GMT
Phone: (714) 727-4242
I accidentally said that the sockets code is in the appl
subdirectory in the archives; it is in actuality located within the
code subdirectory; i.e., /mac/think-c/code/sockets-thinkc.hqx.
Sorry 'bout that!
Mark
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: Re: Please explain this trivial crash
Message-ID: <9208111832.aa25859@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 56
Date: 12 Aug 92 01:32:59 GMT
> Can someone explain to me why this simple code crashes with a bus
>error under Think C 5.0.2?
>
>******
>#include <stdio.h>
>
>#define ORDER 4
>
>void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER]) /*Replaces
>a by b */
>{
> register int i,j;
>
> for(i=0;i<ORDER;i++)
> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
>
>/****
>If you replace the above with
> for(j=0;j<ORDER;j++)
> a[i][j] = b[i][j++];
>then all is well
>****/
> a[i][j] = b[i][j++];
^^
sure that is in the code that works, j is being incremented in for() as
well
I am suspicious of statements like these:
>> a[i][j] = b[i][j++]
is the j on the LHS the original value or post-incremented by the RHS?
I had a *brief* look at Harbison & Steel 3rd edition but couldn't find an
answer staring at me. In C an '=' is an binary expression operator and does
does not act as a sequence point. To quote H&S p207:
"In general, the compiler can rearrange the order in which an expression is
evaluated. The rearrangement may consist of evaluating only the arguments
of a function call, or the two operands of a BINARY OPERATOR (my emphasis),
in some particular order other than the obvious left-to-right order. ..."
To me, that implies the array indexing on the LHS could be done before or
after the RHS expression is evaluated. I'm open to correction on this
point, but if you are writing mathematical software, particularly when
roundoff, overflow, imprecision and other artifacts of floating-point
representations are important, you'd better get a good understanding of C's
evaluation order. Although expression rearrangement does allow for better
compiler optimizations, apparently it does cause problems with mathematical
software in particular. I seem to remember there are (ANSI?) working groups
on exploring ways to make C better for mathematical software.
PS if my guess was correct, you code could have been validly translated by
any C compiler so the last pass thru loop had a[] indexed out of bounds.
Whether THINK did this and why it caused an address error is, as textbooks
say, an exercise for the reader.
cheers,
Path: ucivax!gateway
From: askwersk@athena.mit.edu
Subject: Weird Debugger activity...
Message-ID: <9208120653.AA14652@e40-008-5.MIT.EDU>
Newsgroups: fa.think-c
Lines: 42
Date: 12 Aug 92 06:53:25 GMT
Forgive me those who are receiving this message twice to their simultaneous
subscriptions to the Think-C/TCL mailing groups.
I'm running a Mac SE/30 with 8 megs ram and think c 5.0.2 and latest TCL
version.
I'm using starter.pi project as a framework for my own application that will
work over the modem. However I am having problems debugging the code. It
seems the Debugger is adversely affecting my debugging efforts!
For example, when I try to run the program without the debugger it works
fine (except for the modem part which I am trying to debug). When I run
the debugger and "Go", somehow my Apps itsSwitchboard gets swiped from
under me. I tried a SS (Step Spy) in MacsBug on the address of the Handle
dereferencing itsSwitchboard, and then my Debugger started executing code
that wasnt supposed to be executed. In addition to that the Switchboard
didnt get swiped out from under me! (Does murphy's law reign in programming
or what?)
Some backround on my code: I've overridden the dokeydown method in my
subclass of Ctextedit, in order to send the key to the modem, but I
also call the inherited method as well.
When I comment out the code in the new method that handles sending the
key to the modem, the code works fine then.
I have some Memory Manger calls in that method. I've been thinking that
the problem is simply that the memory manager is purging my Switchboard
so I did a HNoPurge in my IApp method but the problem persists.
I also thought I might be corrupting my heap but that doesnt explain
why the Switchboard is the only (and always the) one being NULLed.
And what does the dang Debugger have to do with it?
Should I have a 'backup' switchboard in case this happens?
Also, I have set the debugger to have a 500k partition and the project
to have a 512k partition. How could I run out of memory so fast?
Adam Skwersky
askwersk@athena.mit.edu
Path: ucivax!gateway
From: MANUTTER@grove.iup.edu ("Mark Nutter, Apple Support")
Subject: Re: Please explain this trivial crash
Message-ID: <01GNHJYJWN7K91VRFU@grove.iup.edu>
Newsgroups: fa.think-c
X-VMS-To: NETMAIL%"think-c@ics.uci.edu"
Lines: 64
Date: 12 Aug 92 12:14:16 GMT
X-Envelope-to: think-c@ics.uci.edu
X-Organization: Indiana University of Pennsylvania
>From: NetMail%"vthrc@mailbox.uq.oz.au" "Danny Thomas" 11-AUG-1992 22:15:22.90
>To: NetMail%"think-c@ics.uci.edu"
>CC:
>Subj: RE: Please explain this trivial crash
>
>Return-path: <fa.think-c-outbound-request@ics.uci.edu>
>Received: from ics.uci.edu by grove.iup.edu (PMDF #12462) id
> <01GNGYZ9TDR495MSJ2@grove.iup.edu>; Tue, 11 Aug 1992 22:15 EST
>Received: from ics.uci.edu by q2.ics.uci.edu id aa25907; 11 Aug 92 18:35 PDT
>Received: from USENET by q2.ics.uci.edu id aa25892; 11 Aug 92 18:33 PDT
>Date: 12 Aug 92 01:32:59 GMT
>From: Danny Thomas <vthrc@mailbox.uq.oz.au>
>Subject: RE: Please explain this trivial crash
>To: think-c@ics.uci.edu
>Message-id: <9208111832.aa25859@q2.ics.uci.edu>
>Newsgroups: fa.think-c
>
>> Can someone explain to me why this simple code crashes with a bus
>>error under Think C 5.0.2?
>>
>>******
>>#include <stdio.h>
>>
>>#define ORDER 4
>>
>>void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER]) /*Replaces
>>a by b */
>>{
>> register int i,j;
>>
>> for(i=0;i<ORDER;i++)
>> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
>>
>>/****
>>If you replace the above with
>> for(j=0;j<ORDER;j++)
>> a[i][j] = b[i][j++];
>>then all is well
>>****/
[stuff deleted]
>PS if my guess was correct, you code could have been validly translated by
>any C compiler so the last pass thru loop had a[] indexed out of bounds.
>Whether THINK did this and why it caused an address error is, as textbooks
>say, an exercise for the reader.
>
>cheers,
>
This is my guess, too: Think C is evaluating the right hand side before the
left hand side. Why not use the Assembler command to take a look at what code
the compiler is actually generating. Even if you're not an assembly whiz, you
should be able to figure out whether the j++ is taking place before or after
the assignment.
-----------------------------------------------------------------------------
Mark Nutter Internet: manutter@grove.iup.edu
Apple Support Manager BITNET: MANUTTER@IUP
Indiana University of Pennsylvania
G-4 Stright Hall, IUP
Indiana, PA 15705
"My horoscope says today is a bad day to be superstitious."
=============================================================================
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Weird problems with THINK C 5.0.2
Message-ID: <9208121352.AA02695@chaos.cs.brandeis.edu>
In-Reply-To: Mike Lyons's message of 11 Aug 92 19:10:27 GMT <9208111942.AA07957@bintec.bintec.de>
Newsgroups: fa.think-c
Lines: 29
Date: 12 Aug 92 13:53:39 GMT
In order for the #include popup and multi-file search through header
files to work, you must have already sucessfully compiled a source
file that #includes header files. For any source file, the list of
header files is constructed at the end of any successful compile.
In a similar fashion, the option-double click on identifiers will only
work if you've sucessfully linked your project, since THINK C uses the
link table to figure out which source file contains a given
identifier.
When you use #pragma once, make sure that you always use the same
capitalization when you #include a header file. Even though the Mac
file system is not case sensitive (for now, at least), THINK C
considers <stdio.h> and <StdIO.h> to be two different files.
> (Str255) CtoPStr (etc...);
This cast is illegal because you can't cast to an array type. Instead
try:
(StringPtr) CtoPStr( /* etc */ );
StringPtr is the "official" name for a pointer to a Str255.
-phil
----
Phil Shapiro Software Engineer
Language Products Group Symantec Corporation
Internet: phils@cs.brandeis.edu
Path: ucivax!gateway
From: bobm@imagine.convex.com (Bob Miller)
Subject: Re: Smooth Animation & GNE/WNE - Is it possible?
Message-ID: <9208121606.AA16261@imagine.convex.com>
In-Reply-To: Your message of "01 Aug 92 16:44:39 GMT."
<9208011646.AA02171@hobbes.kzoo.edu>
Newsgroups: fa.think-c
X-Quote-Of-The: If lawyers had been present on Mount Sinai, the Ten
Commandments would have twelve hundred amendments, all summing
to the conclusion: The rich may ignore these rules, the poor
will be hanged if they violate the smallest subordinate
clause. -- Sigismundo Celine
Lines: 16
Date: 12 Aug 92 16:07:36 GMT
> Well, there's no easy way around it. If you need ten minutes of solidly
> smooth animation at a constant 20 fps, then you're simply not going to
> be able to call WNE.
>
> However, there can be ways around it if your requirements are a little
> less stringent. And it's very nice to know that downloads can go on
> while playing, so giving time to background processes _is_ a goal worth
> striving for.
BTW, it's more important for perceived smoothness that you keep things
moving at a constant rate than that you draw every frame. You might
call GNE as usual, but whenever you draw an update check the current
time and calculate how far the various sprites have moved.
K<bob>
Path: ucivax!gateway
From: askwersk@athena.mit.edu
Subject: Ptrs...
Message-ID: <9208121744.AA21129@e40-008-10.MIT.EDU>
Newsgroups: fa.think-c
Lines: 26
Date: 12 Aug 92 17:44:23 GMT
In Inside the Macintosh V II chapter 9 (Serial Drivers):
"SerSetBuf specifies a new input buffer for the input driver having the
reference number refNum. SerBPtr points tothe buffer, and serBLen specifices
the number of bytes in the buffer. To restore the drivers default buffer,
call SerSetBuf with serBLen set to 0.
Warning: You must lo new input buffer while its in use."
I'm using an allocated handle to a buffer and locking the handle so it
doesnt move. I use the dereferenced handle as the SerBPtr. Is this the only
safe way to go about this? IE could I just use a Ptr and Ptr = NewPtr(Size)?
Are Ptrs automatically locked? I couldnt find a routine in IM to lock
Ptrs. I'm having problems with bad pointers so I wanted to make sure I wasnt
doing any unecessary and potentially dangerous.
Also...the new SerBuf, is that where the FSRead PBRead, etc read their
data from? Or are is it simply the Buffer you pass to the Read function?
Also, do you think its a better idea to follow the CTB or use
the older Toolbox routines?
Adam
Path: ucivax!gateway
From: franklin@eecs.ucdavis.edu
Subject: Re: Please explain this trivial crash
Message-ID: <9208121913.AA06353@pine.eecs.ucdavis.edu>
In-Reply-To: Your message of "11 Aug 92 21:33:49 GMT."
<9208112137.AA10646@poincare.Colorado.EDU>
Newsgroups: fa.think-c
Reply-To: pdfranklin@ucdavis.edu
Lines: 60
X-Mts: smtp
Date: 12 Aug 92 19:13:49 GMT
Your message dated: 11 Aug 92 21:33:49 GMT
> Can someone explain to me why this simple code crashes with a bus
>error under Think C 5.0.2?
You're not watching where your increments are occurring, I think. The
assignment operator '=' in C is a right-to-left operator. Therefore,
in the expression 'a[i][j] = b[i][j++]', if j is 2 when we start, i and
j++ (in b[i][j++]) are evaluated, j is incremented, b[i][2] is evaluated,
i and j are evaluated again (in a[i][j], but j is now 3) and finally, the
result from b[i][2] is assigned to a[i][3]. You get the bus error when
both i and j are ORDER. (You may get it the first time j is ORDER; I
son't remember.) Oh, you're not guaranteed a bus error; I'm not exactly
sure what happens. But, you are looking at a bad memory address, so a
bus error is just one of many possibilities. I think changing the code
to a[i][j++] = b[i][j] should fix it. Try it.
In the second piece of code, you are incrementing j twice, with some very
interesting results. You should get the same problem (but possibly not the
same error) if you add 1 to ORDER. It has to do with whether or not ORDER
is even.
These problems should become evident if you examine the array a[][] in the
debugger after the call to MatrixCopy completes (or when you get the bus
error). Unfortunately, Think C doesn't have a nice method for examining a
2-dimensional array.
BTW, if you are using nearly any level of optimization (such as using
registers across instructions; I'm not sure what the option is called),
you won't get any speed improvement out of packing the assignment and
the increment into the same statement. You might as well make it easier
to read and debug by separating them. Use:
for(i=0;i<ORDER;i++)
for(j=0;j<ORDER;j++)
a[i][j] = b[i][j];
--Paul Franklin
>
>******
>#include <stdio.h>
>
>#define ORDER 4
>
>void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER])
> /*Replaces
>a by b */
>{
> register int i,j;
>
> for(i=0;i<ORDER;i++)
> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
>
>/****
>If you replace the above with
> for(j=0;j<ORDER;j++)
> a[i][j] = b[i][j++];
>then all is well
>****/
>}
>
Path: ucivax!gateway
From: morley@guppy.rutgers.edu (darin s morley)
Subject: the assignment operator
Message-ID: <CMM-RU.1.3.713647966.morley@guppy.rutgers.edu>
Newsgroups: fa.think-c
Lines: 60
Date: 12 Aug 92 19:33:01 GMT
> Can someone explain to me why this simple code crashes with a bus
>error under Think C 5.0.2?
>
>******
>#include <stdio.h>
>
>#define ORDER 4
>
>void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER]) /*Replaces
>a by b */
>{
> register int i,j;
>
> for(i=0;i<ORDER;i++)
> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
>
>/****
>If you replace the above with
> for(j=0;j<ORDER;j++)
> a[i][j] = b[i][j++];
>then all is well
>****/
>}
...
>I am suspicious of statements like these:
>>> a[i][j] = b[i][j++]
>is the j on the LHS the original value or post-incremented by the RHS?
...
>This is my guess, too: Think C is evaluating the right hand side before the
>left hand side. Why not use the Assembler command to take a look at what code
...
This is not a guess.
The assignment operator (=), according to the ANSI standard, operates from right
to left. It has to, because the value on the right hand side must be known
before it can be assigned to the left. Therefore, any expressions appearring on
the right will be evaluated before the left hand side is even considered. The
algorithmic decomposition of
a[i][j] = b[i][j++]
would go something like this:
get value of b[i][j]
j' = j++
store value of b[i][j] in a[i][j']
With i and j equal to zero the actual assignment would be:
a[0][1] = b[0][0]
Notice that in the for-loop above which uses this assignment the error occurs
when a[i][ORDER] = b[i][ORDER - 1]. a[i][ORDER] is out of range.
---
morley@clam.rutgers.edu
Path: ucivax!gateway
From: jdm@boulder.colorado.edu (James Meiss)
Subject: Re: Please explain this trivial crash
Message-ID: <9208121937.AA12982@poincare.Colorado.EDU>
Newsgroups: fa.think-c
Lines: 36
Date: 12 Aug 92 19:33:13 GMT
At 12 Aug 12:14 GMT, Mark Nutter, Apple Support wrote:
>>
>>> Can someone explain to me why this simple code crashes with a bus
>>>error under Think C 5.0.2?
>>> for(i=0;i<ORDER;i++)
>>> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
***stuff deleted****
>This is my guess, too: Think C is evaluating the right hand side before the
>left hand side. Why not use the Assembler command to take a look at what code
>the compiler is actually generating. Even if you're not an assembly whiz, you
>should be able to figure out whether the j++ is taking place before or after
>the assignment.
>
>-----------------------------------------------------------------------------
>Mark Nutter Internet: manutter@grove.iup.edu
Thanks for all the help!. I found that in the following
for(i=0;i<ORDER;v[i] = w[i++]);
for(i=0;i<ORDER;v[i] = w[i],i++);
the first increments i before the assignment, so v[1] = w[0]. Only the
second works like one would want. Ah, the mysteries of C.
James D. Meiss
Program in Applied Mathematics (303)492-4672 office
University of Colorado, Boulder 80309-0526 -4668 secretary
-4066 FAX
jdm@boulder.colorado.edu
Path: ucivax!gateway
From: castalia@gaea.lpl.arizona.edu (Bradford Castalia)
Subject: Re: Please explain this trivial crash
Message-ID: <9208122035.AA19859@gaea.lpl.arizona.edu>
Newsgroups: fa.think-c
Lines: 112
Date: 12 Aug 92 20:34:07 GMT
X-Envelope-to: think-c@ics.uci.edu
K&R (The C Programming Language, second edition) is very explicit about
the situation described. Here is a quote from pp. 53f:
"In any expression involving side effects, there can be subtle
dependencies on the order in which variables taking part in the
expression are updated. One unhappy situation is typified by the
statement
a[i] = i++;
The question is whether the subscript is the old value of i or the
new. Compilers can interpret this in differnt ways, and generate
different answers depending on their interpretation. The standard
intentionally leaves most such matters unspecified. When side effects
(assignment to variables) take place within an expression is left to
the discretion of the compiler, since the best order depends strongly
on machine architecture."
If you want portable and *reliable* code, avoid expressions that have
the possibility for ambiguity vis a vis order of expression
evaluation.
Bradford Castalia castalia@pirl.lpl.arizona.edu
Systems Manager (602) 621-6946
Planetary Image Research Laboratory (602) 621-4824
Space Sciences Building, 429 LPL FAX: (602) 621-4933
University of Arizona
Tucson, Arizona 85721
----- Begin Included Message -----
From fa.think-c-outbound-request@ics.uci.edu Wed Aug 12 06:13:14 1992
From: "Mark Nutter, Apple Support" <MANUTTER@grove.iup.edu>
Subject: Re: Please explain this trivial crash
Newsgroups: fa.think-c
X-Vms-To: NETMAIL%"think-c@ics.uci.edu"
Date: 12 Aug 92 12:14:16 GMT
X-Envelope-To: think-c@ics.uci.edu
X-Organization: Indiana University of Pennsylvania
To: think-c@ics.uci.edu
Content-Length: 2256
X-Lines: 64
>From: NetMail%"vthrc@mailbox.uq.oz.au" "Danny Thomas" 11-AUG-1992 22:15:22.90
>To: NetMail%"think-c@ics.uci.edu"
>CC:
>Subj: RE: Please explain this trivial crash
>
>Return-path: <fa.think-c-outbound-request@ics.uci.edu>
>Received: from ics.uci.edu by grove.iup.edu (PMDF #12462) id
> <01GNGYZ9TDR495MSJ2@grove.iup.edu>; Tue, 11 Aug 1992 22:15 EST
>Received: from ics.uci.edu by q2.ics.uci.edu id aa25907; 11 Aug 92 18:35 PDT
>Received: from USENET by q2.ics.uci.edu id aa25892; 11 Aug 92 18:33 PDT
>Date: 12 Aug 92 01:32:59 GMT
>From: Danny Thomas <vthrc@mailbox.uq.oz.au>
>Subject: RE: Please explain this trivial crash
>To: think-c@ics.uci.edu
>Message-id: <9208111832.aa25859@q2.ics.uci.edu>
>Newsgroups: fa.think-c
>
>> Can someone explain to me why this simple code crashes with a bus
>>error under Think C 5.0.2?
>>
>>******
>>#include <stdio.h>
>>
>>#define ORDER 4
>>
>>void MatrixCopy(double a[ORDER][ORDER], double b[ORDER][ORDER]) /*Replaces
>>a by b */
>>{
>> register int i,j;
>>
>> for(i=0;i<ORDER;i++)
>> for(j=0;j<ORDER; a[i][j] = b[i][j++]);
>>
>>/****
>>If you replace the above with
>> for(j=0;j<ORDER;j++)
>> a[i][j] = b[i][j++];
>>then all is well
>>****/
[stuff deleted]
>PS if my guess was correct, you code could have been validly translated by
>any C compiler so the last pass thru loop had a[] indexed out of bounds.
>Whether THINK did this and why it caused an address error is, as textbooks
>say, an exercise for the reader.
>
>cheers,
>
This is my guess, too: Think C is evaluating the right hand side before the
left hand side. Why not use the Assembler command to take a look at what code
the compiler is actually generating. Even if you're not an assembly whiz, you
should be able to figure out whether the j++ is taking place before or after
the assignment.
-----------------------------------------------------------------------------
Mark Nutter Internet: manutter@grove.iup.edu
Apple Support Manager BITNET: MANUTTER@IUP
Indiana University of Pennsylvania
G-4 Stright Hall, IUP
Indiana, PA 15705
"My horoscope says today is a bad day to be superstitious."
=============================================================================
----- End Included Message -----
Path: ucivax!gateway
From: bobm@imagine.convex.com (Bob Miller)
Subject: Re: Please explain this trivial crash
Message-ID: <9208122056.AA28234@imagine.convex.com>
In-Reply-To: Your message of "12 Aug 92 01:32:59 GMT."
<9208111832.aa25859@q2.ics.uci.edu>
Newsgroups: fa.think-c
X-Quote-Of-The: Open God read/write, to tell him my prayers.
With synchronous I/O, He eases my cares.
He buffers my troubles, and flushes His love.
He's the OS of truth, the kernel above.
Lines: 13
Date: 12 Aug 92 20:57:18 GMT
> PS if my guess was correct, you code could have been validly translated by
> any C compiler so the last pass thru loop had a[] indexed out of bounds.
> Whether THINK did this and why it caused an address error is, as textbooks
> say, an exercise for the reader.
Your guess is correct. It ain't legal to use j in the same expression
as j++. As to why it bus errored, I'd guess that the next word past
the end of the array is a heap management pointer, and the bus error
occurred when that word was stepped upon.
Anyone want to confirm/deny MY guess?
K<bob>
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: Re: the assignment operator
Message-ID: <9208121513.aa29111@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 68
Date: 12 Aug 92 22:13:41 GMT
deleting description of problem posed by James Meiss
<jdm@boulder.colorado.edu>
>>I am suspicious of statements like these:
>>>> a[i][j] = b[i][j++]
>>is the j on the LHS the original value or post-incremented by the RHS?
>...
>
>>This is my guess, too: Think C is evaluating the right hand side before the
>>left hand side. Why not use the Assembler command to take a look at what code
>...
>
>This is not a guess.
>
>The assignment operator (=), according to the ANSI standard, operates from right
>to left. It has to, because the value on the right hand side must be known
>before it can be assigned to the left. Therefore, any expressions appearring on
>the right will be evaluated before the left hand side is even considered.
I've noticed a few people talk about left and right. Certainly that is the
way people naturally think of these operators working, but left & right
refer to the associativity of operators, NOT the order in which their
operands are evaluated.
Eg because "a+=b!=c" doesn't have any brackets AND the operators have the
same precedence it could be interpreted as either "(a+=(b!=c)" or
"(a+=b)!=c". But because the operators on either side of b are right
associative, b is grouped with the != operator first, meaning the
expression is interpreted as "a+=(b!=c)".
This morning I felt more inclined to crack open the ultimate reference,
the ANSI Standard document, American National Standard X3.159-1989.
To quote the Assignment Operator, Section 3.3.16 page 54, line 10:
"Semantics
An assignment operator stores a value in the object designated by the left
operand. An assignment expression has the value of the left operand after
the assignment, but is not an lvalue. The type of an assignment expression
is the type of the left operand unless the left operand has qualified type,
in which case it is the unqualified version of the type of the left
operand. The side effect of updating the stored value of the left operand
shall occur between the previous and next sequence points.
The order of evaluation of the operands is unspecified."
Reading standardese can be a little confusing, but I think the ANSI C
languange is fairly clear, at least compared to the few other standards
I've glanced at. It also comes with a Rationale, which while not a part of
the standard, can be read to grasp the intent, and why certain features
were/weren't added/removed.
The penultimate sentence seems to say that the timing of the actual update
is unspecified, but presumably must occur after both LHS & RHS have been
fully evaluated, but the last sentence says the address on the LHS could
be computed before OR after the value of the expression on the RHS.
MORAL: be very careful writing expressions with side-effects
PS the parentheses in C do NOT control the order of evaluation, they
control how sub-expressions are grouped!
(a-b)+c can be evaluated either as (a+c)-b, or (a-b)+c or (c-b)+a
all of which normally produce the same result in the absence of
under/overflow or floating point exceptions/roundoff/truncation.
cheers,
X500: @c=AU [I'm about to update VTHRC entries, soon...]
@o=University of Queensland
@ou=Physiology and Pharmacology Department
@ou=Vision Touch and Hearing
@cn=Danny Thomas
@rfc822Mailbox=vthrc@cc.uq.oz.au
Path: ucivax!gateway
From: P30WCC9%NIU.bitnet@uicvm.uic.edu (WES COVALT)
Subject: Scroll in Dialog
Message-ID: <9208121812.aa12881@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 15
Date: 13 Aug 92 01:12:44 GMT
Hello,
I want to use a scrolling text field in a modal dialog. I
can get the control drawn (in a "user item") but I can't activate
it. Using the debugger, I've noticed that neither theEvent.where
nor the local equivalent is within the control rect! In fact,
if I click about 20 pixels to the LEFT of the contol it activates!
Does any one have some hints for me?
Thanks much.
Wes Covalt
BITNET ADDRESS: P30WCC9@NIU
INTERNET ADDRESS: P30WCC9@MVS.CSO.NIU.EDU
Path: ucivax!gateway
From: P30WCC9%NIU.bitnet@uicvm.uic.edu (WES COVALT)
Subject: Garbage in TEXT
Message-ID: <9208121824.aa14368@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 15
Date: 13 Aug 92 01:24:56 GMT
Hello,
I have stored some text into a TEXT (& STYL) resource and
I "insert" it into a TE field. Most of the time, but not always
I get one or two garbage characters at the end of the text. Once
in a while I get garbage in the middle of the text as well.
How do I get rid of this garbage? I've played with changing the
strlen, but I still get the garbage characters.
Thanks much.
Wes Covalt
BITNET ADDRESS: P30WCC9@NIU
INTERNET ADDRESS: P30WCC9@MVS.CSO.NIU.EDU
Path: ucivax!gateway
From: crunch@well.sf.ca.us (John Draper)
Subject: Re: ARCHIVE: oops
Message-ID: <199208121805.AA18818@well.well.sf.ca.us>
Newsgroups: fa.think-c
Lines: 7
Date: 13 Aug 92 04:26:42 GMT
I actually pulled it off the "incoming" directory, after I figured
out that the incoming directory is not printable (Restricted apparently),
but I "got" it anyway. Nice piece of code, It is most useful as
an example on how to use Networking code.
Thanx for the turn-on...
JD
Path: ucivax!gateway
From: nagel@cigna.uucp ("Mark D. Nagel")
Subject: Re: ARCHIVE: oops
Message-ID: <688.713716788@cigna.com>
In-Reply-To: Your message of Wed, 12 Aug 92 11:05:56 -0700.
<199208121805.AA18818@well.well.sf.ca.us>
Newsgroups: fa.think-c
Reply-To: nagel@cigna.uucp
Organization: CIGNA FIRST, Irvine, CA
Lines: 21
Date: 13 Aug 92 15:02:34 GMT
Phone: (714) 727-4242
In message <199208121805.AA18818@well.well.sf.ca.us> you write:
I actually pulled it off the "incoming" directory, after I
figured out that the incoming directory is not printable
(Restricted apparently), but I "got" it anyway. Nice piece of
code, It is most useful as an example on how to use Networking
code.
Just so people are aware, ics.uci.edu recently changed the ftp
daemon to the same one used at wuarchive.wustl.edu and many other
sites these days. (Also, they added an alias -- ftp.ics.uci.edu --
that everyone should use now just in case the archive machine
changes in the future). This is why the incoming directory is
unreadable -- in that daemon, the incoming directory is supposed to
be a write-only dropoff point. This adds a small amount of security
for those who ask people to drop off items (I guess random people
couldn't just scan stuff there and grab "private" things). Anyway,
the files are still in the incoming directory, but won't be after
today.
Mark
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: RE: Ptrs...
Message-ID: <920812205309.20207151@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 10
Date: 13 Aug 92 16:01:52 GMT
X-Vmsmail-To: SMTP%"fa.think-c-outbound-request@ics.uci.edu"
Pointers don't need to be locked, because there are fixed into memory. A
handle, a pointer to a pointer needs to be locked, because the memory
manager can move the block of data, and update the second pointer, while the
first pointer remains the same and valid.
I would use the CTB, just so you can have more that 2 serial ports if you
or your app's user has 'em.
Will
Path: ucivax!gateway
From: crunch@well.sf.ca.us (John Draper)
Subject: Re: Ptrs...
Message-ID: <199208131621.AA10017@well.well.sf.ca.us>
Newsgroups: fa.think-c
Lines: 7
Date: 13 Aug 92 16:21:54 GMT
I also want to know the answer to this, so please CC your response to me as
well.
In particular, does SerSetBuf set an "internal" buffer (One that is
different than the "Read" buffer)?
JD
Path: ucivax!gateway
From: jgarner@u.washington.edu (Jeffery Garner)
Subject: AppleEvents: Receiver wants TargetID of Sender
Message-ID: <Pine.3.03.9208141951.A24205-b100000@hardy.u.washington.edu>
Content-Type: TEXT/PLAIN; charset=us-ascii
Mime-Version: 1.0
Newsgroups: fa.think-c
Lines: 45
Date: 15 Aug 92 03:05:33 GMT
Hello! I'm a little confused about a lot of the structures for AppleEvents.
I've written my own custom event called PING, and the sending application
is able to send PING to the receiver. The receiver beeps when it gets
PING. No problem.
Now suppose the receiver wants to know who the sender is (TargetID is fine),
so that the Receiver can "register" the sender's name in a list (of
TargetIDs) so the Receiver can later initiate its own AppleEvents back
to the Sender at a later time...
The Question: How does the receiver of an AppleEvent take apart the
AppleEvent structure in such a way as to get a TargetID out of it?
I tried doing the following, but it didn't work:
pascal OSErr HandlePING(AppleEvent *theAppleEvent, AppleEvent *reply,
long myRefCon)
{
OSErr myErr;
TargetID myTarget;
DescType typeCode;
Size actualSize;
myErr = AEGetParamPtr(theAppleEvent,keyAddressAttr,typeTargetID,
&typeCode,(Ptr) &myTarget, sizeof(TargetID), &actualSize);
if (myErr) return (myErr);
myErr = RequiredCheck(theAppleEvent);
if (myErr) return (myErr);
SysBeep(1);
return (noErr);
}
the first myErr returns an error. It can't find the desc record or something.
Any thoughts would be appreciated!
Jeff Garner
Shoestring Software Products
Internet: jgarner@u.washington.edu
jgarner@visual.spk.wa.us
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: 2 questions
Message-ID: <01GNL8NQKZXU90N1PJ@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 9
Date: 15 Aug 92 03:43:52 GMT
X-Envelope-to: think-c@ics.uci.edu
hello,
1: i want to do something similar to DragGrayRgn, but I want to drag
a whole rgn, like colors and all as if you had picked the _thing_ up.
is there a trap that has evaded my finding. it seems to me to be a mac
thing cus menus come and go without causing an update event.
2: I need sin() and cos() but don't want ansi. is it in sane.
thanks in advance
Path: ucivax!gateway
From: jgarner@u.washington.edu ("Jeff D. Garner")
Subject: Re: AppleEvents: Receiver wants TargetID of Sender
Message-ID: <Pine.3.03.9208151652.A18877-c100000@hardy.u.washington.edu>
In-Reply-To: <Pine.3.03.9208141951.A24205-b100000@hardy.u.washington.edu>
Content-Type: TEXT/PLAIN; charset=us-ascii
Mime-Version: 1.0
Newsgroups: fa.think-c
Lines: 81
Date: 15 Aug 92 23:46:08 GMT
Well, I finally found an answer to my problem, in Apple's Q&A stack of
all places... ( I keep forgetting to look in places like that!).
Here's the solution for those who are interested:
-------------------------------------------------
How can I identify the sender of an Apple event?
If your application is just sending a reply, it should not be creating an
Apple event or calling AESend. Instead, it should stuff the response
information into the reply event in the Apple event handler, as shown on
page 6-50 of Inside Macintosh Volume VI. The Apple Event Manager takes
care of addressing and sending the event.
To find the target ID or process serial number of the sender of an Apple
Event, use AEGetAttributePtr to extract the address attribute, as follows:
retCode := AEGetAttributePtr(myAppleEvent, keyAddressAttr,
typeWildCard, senderType, @senderBuffer, sizeof(senderBuffer),
senderSize)
The senderBuffer can later be used with AECreateDesc to create an address
to be passed to AESend. The buffer should be at least as large as data
type TargetID. See Inside Macintosh Volume VI, page 5-22, for a
description of
TargetID.
On 15 Aug 1992, Jeffery Garner wrote:
>
> Hello! I'm a little confused about a lot of the structures for AppleEvents.
> I've written my own custom event called PING, and the sending application
> is able to send PING to the receiver. The receiver beeps when it gets
> PING. No problem.
>
> Now suppose the receiver wants to know who the sender is (TargetID is fine),
> so that the Receiver can "register" the sender's name in a list (of
> TargetIDs) so the Receiver can later initiate its own AppleEvents back
> to the Sender at a later time...
>
> The Question: How does the receiver of an AppleEvent take apart the
> AppleEvent structure in such a way as to get a TargetID out of it?
>
> I tried doing the following, but it didn't work:
>
> pascal OSErr HandlePING(AppleEvent *theAppleEvent, AppleEvent *reply,
> long myRefCon)
> {
> OSErr myErr;
> TargetID myTarget;
> DescType typeCode;
> Size actualSize;
>
> myErr = AEGetParamPtr(theAppleEvent,keyAddressAttr,typeTargetID,
> &typeCode,(Ptr) &myTarget, sizeof(TargetID), &actualSize);
> if (myErr) return (myErr);
>
> myErr = RequiredCheck(theAppleEvent);
> if (myErr) return (myErr);
>
> SysBeep(1);
> return (noErr);
> }
>
> the first myErr returns an error. It can't find the desc record or something.
>
> Any thoughts would be appreciated!
>
> Jeff Garner
> Shoestring Software Products
> Internet: jgarner@u.washington.edu
> jgarner@visual.spk.wa.us
>
>
Path: ucivax!gateway
From: jimlynch@netcom.com (Jim Lynch)
Subject: Here is a portion of the about think-c file.
Message-ID: <9208161618.AA23232@netcom.netcom.com>
Newsgroups: fa.think-c
Lines: 9
Date: 16 Aug 92 16:19:11 GMT
One request: if someone submits a question on something that seems simple to
you, please remember that it will seem simple to many of the other 425+
subscribers to the list. Please reply to the sender directly unless you
feel it is warranted to broadcast the reply. The person who submitted the
question is urged to followup at some time in the future with a summary of
responses, so others who might be interested can see what the solution was.
This simple rule will prevent much of the chaff that is present on many
mailing lists and newsgroups.
Path: ucivax!gateway
From: KE1RKEN%CUCHEM.bitnet@cunyvm.cuny.edu
Subject: File Searching in HFS
Message-ID: <9208171053.aa17104@q2.ics.uci.edu>
Newsgroups: fa.think-c
X-Original-To: think-c@ics.uci.edu, KE1RKEN
Lines: 10
Date: 17 Aug 92 17:53:45 GMT
I hope someone can help me with code for getting a program to search
for a file. I know it's name. I know what folder it's in. I just don't
know where that folder is. I don't want to use a dialogue box.
Perhaps this is a bit much. Still, it all reduces to getting the list
of files or folders in a givin volume, I think. I can't find the routine
for doing this. The SF routines must use this in the dialogue box.
Where can I find it?
Many Thanks, Bob
Path: ucivax!gateway
From: chai@cs.uiuc.edu
Subject: Shall we have "simple" messages?
Message-ID: <9208172138.AA25335@a.cs.uiuc.edu>
Newsgroups: fa.think-c
Lines: 13
Date: 17 Aug 92 21:38:26 GMT
>One request: if someone submits a question on something that seems simple to
>you, please remember that it will seem simple to many of the other 425+
>subscribers to the list. Please reply to the sender directly unless you
>feel it is warranted to broadcast the reply. The person who submitted the
Hmm... well, sometimes I learn something from these, and the rest of
the time, I just delete it -- no problems.
Perhaps it's a lot harder for some other people?
What do people feel about it?
Ian
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: Re: simple
Message-ID: <01GNP6SO2IOY934PY1@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 5
Date: 17 Aug 92 23:31:05 GMT
X-Envelope-to: think-c@ics.uci.edu
>Hmm... well, sometimes I learn something from these, and the rest of
>the time, I just delete it -- no problems.
agreed
Path: ucivax!gateway
From: eriks@fenix.lin.foa.se (Erik Svensson FOA2)
Subject: File Searching in HFS
Message-ID: <9208180720.AA01518@fenix.lin.foa.se>
In-Reply-To: KE1RKEN%CUCHEM.bitnet@cunyvm.cuny.edu's message of 17 Aug 92 17:53:45 GMT <9208171053.aa17104@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 11
Date: 18 Aug 92 07:17:19 GMT
Why don't you use the system 7 routines for this?
There's a call PBCatSearch (I think it was, don't have IM VI available right
now) that'll find you your file.
Erik Svensson Research Officer
Guided Weapons Division National Defense Research Establishment (FOA)
Stockholm Sweden
net.address: eriks@fenix.lin.foa.se
"I've got LOT's of common sense. I just choose to ignore it." -- Calvin
Path: ucivax!gateway
From: wnn@ornl.gov (Wolfgang Naegeli)
Subject: Mailer problems
Message-ID: <9208181335.AA18956@oaunx1.CTD.ORNL.GOV>
Newsgroups: fa.think-c
Lines: 40
Date: 18 Aug 92 15:26:25 GMT
Reply to: Mailer problems
Starting about July 15 for some two weeks we had severe problems with
ics.uci.edu opening but not closing SMTP connections when sending us messages.
After all SMTP listener sockets on our Mail*Link SMTP gateway were tied up, we
were unable to recieve any incoming messages from anywhere. We had no telling
of what had happened since outgoing traffic was not affected. We had to reboot
frequently when we got dinged by the administrator of our central mail router
who complained that large mail queues were building up for us.
Did any other think-c recipients experience similar problems?
On 8/13 Mark wrote:
> ics.uci.edu recently changed the ftp daemon to the same one used at
> wuarchive.wustl.edu and many other sites these days.
Could that change have had something to do with our problems? When exactly was
that change made?
Of course, as usual, all of this happened while I was out of town. Starnine
Tech Support sent us a diagnostic tool, but as mysteriously as the problems had
started, they disappeared. Fortunately we were able to capture the last
occurrence and after Starnine analyzed the postmortem and fingered ics.uci.edu
I wrote to its postmaster, but got his reply that he had not noticed anything
unusual. Only last week, I realized that ics.usi.edu actually is the host
think-c comes from.
Even though we are problem-free again, we would like to get to the bottom of
this in hopes of preventing any possible future recurrence since it affected
many of our e-mail users.
Any facts, clues, hints, and observations will be greatly appreciated.
Wolfgang N. Naegeli
University of Tennessee & Oak Ridge National Laboratory
Internet: wnn@ornl.gov (best) Bitnet: wnn@ornlstc
QuickMail (QM-QM): Wolfgang Naegeli @ 615-574-4510
Phone: 615-574-6143 Fax: 615-574-6141 (OrchidFax)
Path: ucivax!gateway
From: slosser@mindseye.berkeley.edu (Eric Slosser)
Subject: 2 questions
Message-ID: <9208181627.AA04042@mindseye.berkeley.edu>
In-Reply-To: AARON BARNETT's message of 15 Aug 92 03:43:52 GMT <01GNL8NQKZXU90N1PJ@TOE.TOWSON.EDU>
Newsgroups: fa.think-c
Lines: 4
Date: 18 Aug 92 19:48:47 GMT
For your question about dragging a whole object around, look in
Knaster and Rollin's book for some very nice sample code.
Path: ucivax!gateway
From: huff@mcclb0.med.nyu.edu ("Edward J. Huff")
Subject: Smooth Animation vs. QuickTime
Message-ID: <01GNQQL3P5UQ00095E@MCCLB0.MED.NYU.EDU>
Content-transfer-encoding: 7BIT
Newsgroups: fa.think-c
Lines: 11
Date: 19 Aug 92 02:02:53 GMT
X-Envelope-to: think-c@ics.uci.edu
There has been some discussion of smooth animation but no one has
mentioned quicktime. Isn't smooth animation the purpose of quicktime?
(I have a Quadra 950 here which came with quicktime, but I haven't
used it yet... I noticed that there is a quicktime directory at
ftp.apple.com which contains the quicktime INIT, identical to the
one which came on my system).
--
Edward J. Huff huff@mcclb0.med.nyu.edu (212)998-8465
Keck Laboratory for Biomolecular Imaging
NYU Chemistry Deptartment, 31 Washington Place, New York NY 10003
Path: ucivax!gateway
From: wadew@ducvax.auburn.edu (Wade Williams)
Subject: Great job Symantec!
Message-ID: <9208191432.AA02910@accs.duc.auburn.edu>
Newsgroups: fa.think-c
Lines: 56
Date: 19 Aug 92 14:30:56 GMT
Someone who is taking an online C course complained last night that THINK C
takes up more room than her DOS C files. She was doing the classic Hello
World and had the following sizes:
Hello World project (with ANSI lib) 64K
Hello World built app 20K
Her DOS project was
Hello.c 2K
Hello.exe 8K (this was after deleting Hello.obj)
I explained to her that if she removed objects from her THINK C project,
that was the same as deleting Hello.OBJ on the DOS side.
That made the score:
Hello World project 8K
Hello World app 20K
So, you end up with 28K on Macintosh vs. 10K on DOS.
I went on to explain that the DOS machine can pretty much just write to the
screen whereas the Mac has to draw a window, handle events, etc. That
accounts for the extra 10K. I also explained that Smart linking includes a
whole file even if only one function is referenced (that is correct,
right?). I explained that if she really wanted to take the time, she could
copy just the functions she needed and paste those into her project and
remove the ANSI library, making for a much smaller project. However, the
convenience makes that not worth the trouble.
Then I examined the built Hello World app. A 20K app had a movable window,
handled events, had a functioning menubar, supported clipboard operations
and supported backgrounding. I was also able to get the app to run stabily
in 55K of RAM.
Can you imagine how much code it would take to create a DOS or Windows
program that did the same thing? I'd be willing to bet a whole lot more
than 20K.
I know that most of the credit goes to Apple for providing such a great
Toolbox, but I'd like to congratulate Symantec as well. It really amazes
me that it only takes 20K to do all the things that the Hello World app
does. I know it doesn't sound like much, but if you sit down and think
about it, it's really a lot.
Good job Symantec!
-------------------------------------------------------------------
Wade Williams "One likes to believe in the freedom
User Services Specialist of music, but glittering prizes and
Academic Computing Services endless comprimises shatter the
Auburn University illusion of integrity."
wadew@ducvax.auburn.edu (N. Peart of Rush)
--------------------------------------------------------------------
Path: ucivax!gateway
From: mxmora@unix.sri.com
Subject: Re: Smooth Animation vs. QuickTime
Message-ID: <9208191512.AA02946@unix.sri.com>
Newsgroups: fa.think-c
Lines: 19
Date: 19 Aug 92 15:12:32 GMT
>There has been some discussion of smooth animation but no one has
>mentioned quicktime. Isn't smooth animation the purpose of quicktime?
>(I have a Quadra 950 here which came with quicktime, but I haven't
>used it yet... I noticed that there is a quicktime directory at
>ftp.apple.com which contains the quicktime INIT, identical to the
>one which came on my system).
A quadra is about the only mac that can do quick time smoothly so thats not
an option.
Matt
_____________________________________________________________________
Matthew Xavier Mora | The keeper of the UMPG
SRI International | Matt_Mora@QM.sri.com
[sent using Eudora 1.3b46] | mxmora@unix.sri.com
_____________________________________________________________________
"You give good headgames, your tongue is so strange, caught in these
backstage chains." _Crashed_ by Slik Toxik
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: terrain generator
Message-ID: <01GNRRHK7GW2934X1V@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 3
Date: 19 Aug 92 19:46:22 GMT
X-Envelope-to: think-c@ics.uci.edu
i need to generate some 3-d terrain randomly (mountains vally) I can
handle displaying it, but I havn't a clue how to generate it.
anyone...
Path: ucivax!gateway
From: franklin@eecs.ucdavis.edu (Paul Franklin)
Subject: Re: terrain generator
Message-ID: <9208200042.AA18446@pine.eecs.ucdavis.edu>
In-Reply-To: Your message of "19 Aug 92 19:46:22 GMT."
<01GNRRHK7GW2934X1V@TOE.TOWSON.EDU>
Newsgroups: fa.think-c
Reply-To: pdfranklin@ucdavis.edu
Lines: 26
X-Mts: smtp
Date: 20 Aug 92 00:43:17 GMT
Your message dated: 19 Aug 92 19:46:22 GMT
>i need to generate some 3-d terrain randomly (mountains vally) I can
>handle displaying it, but I havn't a clue how to generate it.
>anyone...
This is really a math problem. What you want is a function f(x,y)
that will give you a 3-D terrain. Try
f(x,y) = 10/(1+x*x+y*y)
Now, you should be able to combine these. For example,
f(x,y) = 10/(1 + x*x + y*y) - 5/(1 + (x-4)*(x-4) + (y+3)*(y+3))
Try plotting that one. The more terms, the more hills/valleys.
Looking at the valley in the second example, the -5 is its height (the
negative makes it a valley), and x-4=0, y+3=0 gives you the center of
the valley (4,-3). You could also make it something other than a
round hill (oval?) by multiplying (y+3) by 2. Just play with it, and
see what combinations seem to fit in with what you want.
I'm pretty sure I got the function right; I took it from memory and
just tried a few test cases in my head.
--Paul Franklin
Path: ucivax!gateway
From: pmiller@topaz.bmr.gov.au (Peter Miller)
Subject: Re: terrain generator
Message-ID: <9208200217.AA18036@topaz.bmr.gov.au>
In-Reply-To: Your message of 19 Aug 92 19:46:22 +0000.
<01GNRRHK7GW2934X1V@TOE.TOWSON.EDU>
Newsgroups: fa.think-c
Lines: 16
Date: 20 Aug 92 02:14:42 GMT
AARON BARNETT <C2MXBAR@fre.towson.edu> writes:
> i need to generate some 3-d terrain randomly (mountains vally) I can
> handle displaying it, but I havn't a clue how to generate it.
> anyone...
Try Eric Haines' SPD package for testing renderers.
One of the scenes is fractal mountains.
The comp.graphics FAQ lists several archive sites,
if you don't have usenet or ftp, try sending email to
netlib@research.att.com
with a subject of "help". This archive also has SPD.
Regards
Peter Miller.
Path: ucivax!gateway
From: de19@umail.umd.edu (Dana S Emery)
Subject: Re: terrain generator
Message-ID: <Mailstrom.B54.39154.-2558.de19@umail.umd.edu>
In-Reply-To: Your message <01GNRRHK7GW2934X1V@TOE.TOWSON.EDU> of 19 Aug 92
19:46:22 GMT
Content-Type: TEXT/plain; charset=US-ASCII
Newsgroups: fa.think-c
Lines: 17
Date: 20 Aug 92 04:33:40 GMT
> i need to generate some 3-d terrain randomly (mountains
> vally) I can handle displaying it, but I havn't a clue
> how to generate it. anyone...
If this was for a game, you might be able to do with random choice of cleverly
predesigned 'tiles', for an overhead view you could also make them rotateable.
Other than that it is time to break out the acm graphics journals and dig into
some serious fractal hackery. I would attempt to discern some rules as to what
makes mountains grow, and then use suitable randomization of that to establish a
skeleton which would be fleshed out useing fractal textureing. Unfortunately
this is a wee bit above my present math skills. Hope you are targeting some
nice crunchy hardware.
Dana S Emery <de19@umail.umd.edu>
Path: ucivax!gateway
From: bobm@imagine.convex.com (Bob Miller)
Subject: Re: terrain generator
Message-ID: <9208201611.AA12786@imagine.convex.com>
In-Reply-To: Your message of "19 Aug 92 19:46:22 GMT."
<01GNRRHK7GW2934X1V@TOE.TOWSON.EDU>
Newsgroups: fa.think-c
X-Quote-Of-The: I sure like to succeed, but you can't get away from the fact
that failure gives you a great liberty. -- Jack Crabb
Lines: 78
Date: 20 Aug 92 16:12:21 GMT
> i need to generate some 3-d terrain randomly (mountains vally) I can
> handle displaying it, but I havn't a clue how to generate it.
> anyone...
You can generate random fractal terrain pretty easily.
The basic idea is to start with a square, subdivide it, into quarters,
and then randomly perturb the center point. Now you have
four smaller squares, so repetitively subdivide them. As the squares
get smaller, the perturbations get smaller too.
For example, (I just typed this in, so it probably has a bug or two
and a few syntax errors...)
#define LOGN 5
#define N (1 << LOGN)
int elevation[N + 1][N + 1]; /* 33x33 elevation grid, ranges from */
/* -1000 to 1000 */
int random(int n)
{
/* return random integer uniformly distributed between 0 and n - 1; */
}
/* average_elev returns average elevation among four points. */
int average_elev(minx, miny, maxx, maxy)
{
return (elevation[minx][miny] + elevation[minx][maxy] +
elevation[maxx][miny] + elevation[maxx][maxy]) / 4;
}
/*
* subdivide() recursively subdivides a square area in elevation
* into smaller squares, perturbing each one's center.
*/
void subdivide(int minx, int miny, int maxx, int maxy, int perturbation_size)
{
int midx = (minx + maxx) / 2;
int midy = (miny + maxy) / 2;
int avg_elev;
int half_pert = perturbation_size / 2;
if (maxx <= minx + 1)
{ /* This is a 1x1 square; don't subdivide any further */
return;
}
avg_elev = average_elev(minx, miny, maxx, maxy);
elevation[midx][midy] = random(perturbation_size) - half_pert + avg_elev;
subdivide(minx, miny, midx, midy, half_pert);
subdivide(midx, miny, maxx, midy, half_pert);
subdivide(minx, midy, midx, maxy, half_pert);
subdivide(midx, midy, maxx, maxy, half_pert);
}
/*
* generate_terrain() generates, in the elevation array, a randomly
* perturbed N+1 x N+1 elevation map.
*/
void generate_terrain(void)
{
/* Pick four corners at random heights. */
elevation[0][0] = random(1000) - 500;
elevation[0][N] = random(1000) - 500;
elevation[N][0] = random(1000) - 500;
elevation[N][N] = random(1000) - 500;
subdivide(0, 0, N, N, 500);
}
You get the idea, don't you?
K<bob>
Path: ucivax!gateway
From: chai@cs.uiuc.edu
Subject: Summaries yes, multiple replies no
Message-ID: <9208202247.AA13115@a.cs.uiuc.edu>
Newsgroups: fa.think-c
Lines: 16
Date: 20 Aug 92 22:47:22 GMT
Hi, everyone.
Recently I posted a message saying that I sometimes benifited from the many
replies to a problem, and had no trouble deleting stuff that didn't interest
me and so I would like to see them continue.
However, several people have pointed out that the listowner has guidlines
saying that this should not be done -- instead, summaries should be posted
by the original querient at the end of his/her search.
Since this is the listowner's policy, yes, we should follow it. So I retract
my earlier statements.
Thanks for your patience.
Ian
Path: ucivax!gateway
From: rodrigo@cmf.nrl.navy.mil
Subject: In TCL, file is locked?
Message-ID: <9208211239.AA20120@cmsun.cmf.nrl.navy.mil>
Newsgroups: fa.think-c
Lines: 19
Date: 21 Aug 92 12:39:59 GMT
I am working with TC 5.0.2 and TCL 1.1.2. When I open a file (document)
and I try to open it again I would like to be able to issue an alert
saying something like " This file is being used..." . The Open method in
the class DataFile uses FailOSError with HOpen as argument. If there is
an error from HOpen, FailOSError handles it. This led me to belive that I
have to subclass FailOSError to handle a particular error in HOpen. However,
I doubt it and I am sure there is something simpler that can be done.
So, my question is: Is there a way to check if a file is being used or locked
(using TCL) before sending the Open message?
Any help on this will be appreciated.
Thanks.
Rodrigo.
rodrigo@cmf.nrl.navy.mil
Path: ucivax!gateway
From: koops@owlnet.rice.edu (Ryan Richard Koopmans)
Subject: remove me
Message-ID: <9208211625.AA18283@spotted.owlnet.rice.edu>
Newsgroups: fa.think-c
Lines: 1
Date: 21 Aug 92 16:25:42 GMT
Please remove me from the mailing list.
Path: ucivax!gateway
From: KE1RKEN%CUCHEM.bitnet@cunyvm.cuny.edu
Subject: Re:HFS file searching
Message-ID: <9208210953.aa09257@q2.ics.uci.edu>
Newsgroups: fa.think-c
X-Original-To: think-c@ics.uci.edu, KE1RKEN
Lines: 21
Date: 21 Aug 92 16:53:58 GMT
My thanks to all those who responded to my query about how to search
for a file within a folder, whose location is not precisely known.
Several respondents recomended use of PBGetCatInfo in Inside Mac VI.
Another, with warning of the task ahead, recomended Inside Mac IV.
Further traipsing about the internet ended in Apple.com (ftp:130.43.2.3)
in /dts/mac/sc was found the file: sc-018-stdfilesample.hqx. It appears
to be extensive in a variety of calls to the file system. It is, of course,
written in Pascal using MPW. There are some cryptic indications in the
file that a C version was considered or perhaps even implemeted. Such
a file cannot be found, unfortunately.
So, does anyone know of this .c file? If not, if some brave individual
were to try to translate this program into THINK C, would he/she be able
to post it to the net for public consumption without violating Apple's
rights (which are indicated to be reserved). I would ponder (with
great trepidation) such an effort, but not for just my consumption.
The main file is some 65 pages in length and I am not a Pascal programmer.
Best Wishes,
Bob Kennedy
Path: ucivax!gateway
From: P30WCC9%NIU.bitnet@uicvm.uic.edu (WES COVALT)
Subject: GetResource( 'TEXT', id) problem
Message-ID: <9208221651.aa10405@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 12
Date: 22 Aug 92 23:51:40 GMT
I have been using GetResource() to get 'TEXT' resources for various
dialog screens. I have been getting "funny" characters at the end
of these text files. I release the resource and dispose of the
handle after I use the resource (and show a particular screen).
I know that the problem is at GetResource becuase when I look
at the text pointed to with the debugger, the text is all mine
except for the these few characters. Sometimes these characters are
from another of my text resources that I had just shown. Sometimes.
Do I have to initialize something? Do I need to clear memory?
Is there another way of storing large amounts of text (with style)
and not use a PICT?
Path: ucivax!gateway
From: dockx@cs.kuleuven.ac.be
Subject: c on mac
Message-ID: <9208170832.AA21546@neptunus.cs.kuleuven.ac.be>
Newsgroups: fa.think-c
Lines: 6
X-Mts: smtp
Date: 24 Aug 92 03:30:15 GMT
I'm in the process of scanning c++ language to buy for my mac. Can you,
or one of your subscribers, tell me why I should (or shouldn't) buy Think-c?
Jan Dockx "dockx@cs.kuleuven.ac.be"
Leuven, Belgium
Europe
Path: ucivax!gateway
From: nagel@buckaroo.ICS.UCI.EDU (Mark Nagel)
Subject: ARCHIVE: Arashi (Project STORM) source code
Message-ID: <3216.714627210@buckaroo.ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: jmunkki@sandman.cs.hut.fi
Lines: 26
Date: 24 Aug 92 03:36:03 GMT
------- Forwarded Message
Date: Thu, 20 Aug 92 21:55:10 +0300
From: jmunkki@sandman.cs.hut.fi
To: think-c-request@ics.uci.edu
Subject: Arashi (STORM) source code
The complete source code and documentation set for the Arashi (Project STORM)
game has been placed in the /incoming directory. Please read the included
read me file.
If you are interested in writing arcade games for the Macintosh, you should
definitely at least take a look.
The file is quite large (over 800KB).
Juri Munkki
jmunkki@hut.fi
------- End of Forwarded Message
[saved as: /mac/think-c/code/Arashi_Source.cpt.bin; 840K]
[NOTE: This is a BINARY submission; remember to use binary mode when]
[retrieving this file. ]
Path: ucivax!gateway
From: nagel@buckaroo.ICS.UCI.EDU (Mark Nagel)
Subject: ARCHIVE: sockets library removed
Message-ID: <3430.714627704@buckaroo.ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: think-c-request@ics.uci.edu
Lines: 9
Date: 24 Aug 92 03:47:11 GMT
The author of the sockets library notified me that the version I
placed in the archives is not for distribution, so I removed it.
The real version should be ready real soon now, so please, be
patient and don't send him questions about the copy you got from the
archives.
Thanks!
Mark
Path: ucivax!gateway
From: nick@dcs.ed.ac.uk (Nick Rothwell)
Subject: XCMD/XFCN calling conventions
Message-ID: <9208241101.aa05411@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 10
Date: 24 Aug 92 10:06:19 GMT
Could some kind soul provide a quick description of what XCMD's and XFCN's
look like in terms of source? I want to add some externals to the
MicroPhone II scripting system, but there's no information about the
calling conventions. I assume they're just A4-global code resources with
pascal argument passing, but I don't know anything more than that. A more
complex question is how to generate and return strings into MicroPhone II,
but I'd better ask SVC tech support directly about that...
Nick.
Path: ucivax!gateway
From: rex@sics.se (Rolf Staflin)
Subject: XCMD/XFCN calling conventions
Message-ID: <9208241127.AA15112@nancarrow.sics.se>
In-Reply-To: Nick Rothwell's message of 24 Aug 92 10:06:19 GMT <9208241101.aa05411@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Reply-To: rex@sics.se
Lines: 16
Date: 24 Aug 92 11:27:52 GMT
>From: Nick Rothwell <nick@dcs.ed.ac.uk>
>Newsgroups: fa.think-c
>Date: 24 Aug 92 10:06:19 GMT
>
>Could some kind soul provide a quick description of what XCMD's and XFCN's
>look like in terms of source?
I have no idea, but please let me know if you get any good answers (if
you summarize to think-c, I'll get it that way)
Thanks in advance and good luck!
/Rex
---------
Rolf Staflin SnailMail: SICS, Box 1263, S-164 28 KISTA, Sweden
Email: rex@sics.se Phone: +46 8 752 15 67 Telex: 812 6154 7038 SICS
Telefax: +46 8 751 72 30 Voice: "Vakna, Roffe!" Mizar: >greet Zarquon
Path: ucivax!gateway
From: rex@sics.se (Rolf Staflin)
Subject: Speeding up the graphics...
Message-ID: <9208241424.AA16274@nancarrow.sics.se>
In-Reply-To: Rolf Staflin's message of Mon, 24 Aug 92 13:27:41 +0200 <9208241127.AA15112@nancarrow.sics.se>
Newsgroups: fa.think-c
Reply-To: rex@sics.se
Lines: 26
Date: 24 Aug 92 14:24:39 GMT
(Sorry about my last post - didn't see the CC field (again).)
Anyway, I've been meaning to ask this for quite a while, but I suspected it
might be done already.
Do you know any (safe) ways to improve graphics performance under system 6?
I'm writing a game (lunar lander style with variations) on my old Plus, and
I'm having trouble with the frame rate. I've been doing odd Mac hacks for the
last three years, so I'm fairly familiar with the OS and toolbox, but I
have only read I.M. I-IV, and they don't give that much advice in the
matter. Games like Crystal Quest and Continuum manage to get quite a lot of
performance out of the Plus, but my program bogs down with only two or
three "sprites". Somebody spoke of using waitNextEvent() in stead of
GetNextEvent() -- is that a good way to gain performance? CopyBits is
pretty slow -- do I have to write my own routines for bitmaps (I've started
on a poor man's CopyBits in assembler, but I haven't worked on it since
last christmas)?
All input along these lines would be greatly appreciated. I'm thinking of
compiling some sort of document with speed hints for the archives. Has this
been done already? I'll summarize here, so e-mail me any responses
(remember the CC field :-)).
/Rex
---------
Rolf Staflin SnailMail: SICS, Box 1263, S-164 28 KISTA, Sweden
Email: rex@sics.se Phone: +46 8 752 15 67 Telex: 812 6154 7038 SICS
Telefax: +46 8 751 72 30 Voice: "Vakna, Roffe!" Mizar: >greet Zarquon
Path: ucivax!gateway
From: fleabag@athena.mit.edu
Subject: sending a 'writ' appleevent
Message-ID: <9208250200.AA13593@e40-008-6.MIT.EDU>
Newsgroups: fa.think-c
Lines: 23
Date: 25 Aug 92 02:01:13 GMT
hello folks,
i'm trying to find a way to send a "Force Write" message to another
application. that is, i want to send someone a 'writ' event (class 'sect')
to force it to update a publisher, to which i subscribe. it's a common
appleEvent which many apps use, but only when Apple sends it. for
my app to send it involves one problem: getting the right value
for the sectionHandle which i want published.
if i send the 'writ' event with my copy of the sectionHandle, the other
app doesn't find a match for it, since we have different copies of the
information. so how can i get a copy of its sectionHandle? or, how
else can i get it to publish NOW!?
i can assume that the other app is running on the same machine, by the
way.
thanks for any help,
:jeff bellsey
fleabag@athena.mit.edu
Path: ucivax!gateway
From: nick@dcs.ed.ac.uk (Nick Rothwell)
Subject: ANSI-A4, ANSI-small
Message-ID: <9208261206.aa05361@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 9
Date: 26 Aug 92 11:10:30 GMT
The TC5 manual says that ANSI-A4 is a subset of ANSI-small since file
operations aren't available in an A4-globals library (or words to that
effect). Is there a reason for this? I'd like to do some file munging in
XCMDs/XFCNs, and have built myself an A4 ANSI-small for that reason. Why
would fopen(), fclose() and the like not work? (I haven't tried it yet,
since I still haven't figured out the XFCN calling conventions fully...)
Nick.
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: Re: ANSI-A4, ANSI-small
Message-ID: <9208261620.aa10636@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 143
Date: 26 Aug 92 23:20:12 GMT
Nick Rothwell <nick@dcs.ed.ac.uk> writes:
>The TC5 manual says that ANSI-A4 is a subset of ANSI-small since file
>operations aren't available in an A4-globals library (or words to that
>effect). Is there a reason for this? I'd like to do some file munging in
>XCMDs/XFCNs, and have built myself an A4 ANSI-small for that reason. Why
>would fopen(), fclose() and the like not work? (I haven't tried it yet,
>since I still haven't figured out the XFCN calling conventions fully...)
>
>Nick.
Hello Nick, to repost a reply I sent here a month ago; I think the recipe
that follows is fairly accurate in what I did with a multi-segment code
resource for an Igor XOP (eXternal OPeration, analagous to HC XCMD/XFCNs
but I don't know how the interface compares), but I would like to hear how
other people go, plus any other comments:
cheers,
X500: @c=AU [I'm about to update VTHRC entries, soon...]
@o=University of Queensland
@ou=Physiology and Pharmacology Department
@ou=Vision Touch and Hearing
@cn=Danny Thomas
@rfc822Mailbox=vthrc@cc.uq.oz.au
[repost follows]
Zach Kessin <zkessin@chaos.cs.brandeis.edu> writes
>Is there a way to use the ansi file operstions fprinf(), fopen() etc
>in a code resource? Better yet a way to get a fake prinf() that would
>send output to a text buffer?
>
>I think I could fake it if I had to...
> ...But I'd rather not have to.
well Zach, I recently went through this in writing an XOP (external module)
for the Igor graphing/analysis program. In my case there were several other
ANSI facilities I wanted to use (eg strftime()) which amounted to rather
more work than simply faking fopen() etc. To quote from the comments I
wrote at the time:
/*
* NOTES ON THINK C ANSI LIBRARY IN XOPs
*
* ANSI A4 is missing quite a few ANSI functions, perhaps because they
* aren't needed by most things you do in the A4 world, but with some of
* them it isn't as simple as just including the file in the project:
* in the case of time.c, it simply has arrays of strings with
* an initializer of literal strings constants. These are OK in
* a single-segment code resource, but not in a multi-segment project.
* The workaround is to use a function to perform the initialization.
*
* PROBLEMS WITH STDIO FUNCTIONS
* have to include at least
* alloc, fread, fseek, getc, iomisc, stdio
* the FILE structs are allocated statically, but the buffers are
* malloc'd and free'd by fclose() and other functions. It is
* important that the buffers are free'd upon exit from the XOP
* including premature panic exits.
* I think malloc should be OK with CODE resources though they
* can't be used from interrupt routines, such as drivers
* my approach is to remove the _atexit_stdio() function register
* and and move the stdio_exit() call to the CLEANUP message below.
*/
// time.c modified because it had static string initialization
// so this routine needs to be called before using ANY ANSI time stuff!!
void init_time_routines(void);
// in the THINK ANSI stdio library, this routine was registered
// as an at_exit function. This was causing a problem, see notes below.
void stdio_exit(void);
*=*=*=*=*=*=*=*=*=*=*=* RECIPE *=*=*=*=*=*=*=*=*=*=*=*=
make a copy of time.c called my_ANSI_time.c and place this conditional
around the definitions of day/month names already there (or simply replace
them)
#if 1
static char *dayname[7]; // had string initializers
static char *monthname[12]; // had string initializers
void init_time_routines(void); // new function
void init_time_routines(void)
{
dayname[0] = "Sunday"; dayname[1] = "Monday"; dayname[2] =
"Tuesday";
dayname[3] = "Wednesday"; dayname[4] = "Thursday"; dayname[5] =
"Friday";
dayname[6] = "Saturday";
monthname[0] = "January"; monthname[1] = "February";
monthname[2] = "March"; monthname[3] = "April";
monthname[4] = "May"; monthname[5] = "June";
monthname[6] = "July"; monthname[7] = "August";
monthname[8] = "September"; monthname[9] = "October";
monthname[10] = "November"; monthname[11] = "December";
}
#else
... proprietary Symantec code
#endif
so at the start of your code YOU will have to call init_time_routines() to
initialise the month names.
make a copy of fopen.c called my_ANSI_fopen.c
Comment out the call to __atexit_stdio() at the end of __open()
Excise the "static" qualifier on the prototype declaration at the top of
the file, as well as the actual function definition of stdio_exit(). This
means that at the end of your program YOU will have to explicitly call
stdio_exit() to clean up the open files.
NB check comment block above, the cleanup has to be done on premature exits
too! (which was why THINK at_exit() registered the function)
In my case I made up a code-resource project with the following unmodified
THINK modules and built it as a library
arith.c, atoi.c, bufio.c, ctype.c, errno.c, fwrite.c, mem.c, printf.c,
scanf.c, stdio.c, str.c, strn.c & ungetc.c
PS on reflection, maybe this was the original THINK A4 library?
In the actual project for my XOP I included this library (8026 bytes) plus
alloc.c, fread.c, fseek.c, getc.c, iomisc.c my_ANSI_fopen.c &
my_ANSI_time.c
Mind you these could have been compiled in a second library.
That's all that I seem to have written down. All I know is that it seemed
to work for me but would be grateful to hear of other comments notably why
the at_exit() stuff didn't work. I believe MPW doesn't have the same
restrictions on multi-segment A4 stuff as THINK does.
Path: ucivax!gateway
From: walshag@hermes.bc.edu (WALSHAG)
Subject: ModalDialog Abuse...
Message-ID: <9208261650.aa13989@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 27
Date: 26 Aug 92 23:50:12 GMT
Let me first say:
I *know* I shouldn't be doing this.
I should be using the Window Manager instead.
I have read Tech. Note #203.
however....
I must have a movable dialog in a specific situation, and (for the
time being) it can not be a movable-modal. I am using a custom
filter procedure with ModalDialog, where I need to be sure that a
"slice of the processing pie" is given to other applications. This
is necessary because apps in the background must have an opportunity
to update the area my dialog has been dragged over.
Currently, my dialog erases all underlying graphics. My dialog is used in an
FKEY, not within an application. This seems to complicate things.
At one point I had solved this, but that was some time ago and I can
no longer find the code. Now I'm kicking myself...
Does anyone have suggestions? I am under the gun to finish this and
would appreciate any help.
many thanks,
Aaron Walsh
walshag@bcvms.bc.edu
Path: ucivax!gateway
From: walshag@hermes.bc.edu (WALSHAG)
Subject: Pixel-editor source?
Message-ID: <9208261721.aa10977@Paris.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 18
Date: 27 Aug 92 00:58:01 GMT
I am going to be creating a pixel-editor, one that can create a color image to
be saved as a pixel pattern (ppat). Since I'll be creating the editor from
scratch (ugh), I would be like at least the skeleton of an existing one to
build upon.
Last I heard there was source to a color icon editor on MouseHole (MacTutor's
BBS). I just tried to connect, but the number is in the process of being
changed so I'm out of luck!
Does anyone have C source (procedural or TCL) for a color pixel-editor of any
type, which I might augment for my own use?
I would appreciate any leads,
Aaron Walsh
walshag@bcvms.bc.edu
Path: ucivax!gateway
From: nick@dcs.ed.ac.uk (Nick Rothwell)
Subject: Re: ANSI-A4, ANSI-small
Message-ID: <9208271124.aa25388@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 13
Date: 27 Aug 92 10:28:44 GMT
Needless to say, I didn't catch this thread a month ago, since I didn't
think I'd be trying to do A4-global file I/O at any stage. I'll try to keep
my thing single-segment, but it looks as if I still have to deal with exit
conditions properly. I'll have a look over your code: ta.
I'd dispense with the ANSI I/O modules and do it all with file manager
calls, except that MicroPhone II is going to deliver entire path names to
me, and I don't think FSOpen() and the like will take full path names. The
easiest way might be to lift the path name resolution code out of
ANSI-small and do it myself, just using the File Manager...
Nick.
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (AARON BARNETT)
Subject: Pixel-editor source? me too.
Message-ID: <01GO2UV2FVK2935KE9@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 7
Date: 27 Aug 92 18:16:26 GMT
X-Envelope-to: think-c@ics.uci.edu
hey fellas,
im interested in pixel editor code also. id really like to get that
color icon editor mentioned in the original note. thats closer to what
i need.
thanks
Path: ucivax!gateway
From: inei@dcs.gla.ac.uk (inei)
Subject: Pointer arithmetic evaluation bug in THINK C?
Message-ID: <9208271635.AA27532@hawaii.dcs.gla.ac.uk>
Newsgroups: fa.think-c
Lines: 59
Date: 28 Aug 92 08:37:49 GMT
Given the following program:
char line[] = "Hello";
main()
{
char *cp1 = line;
char *cp2 = &line[4];
int len = cp2 - cp1;
printf ("diff = %d\n", cp2 - cp1);
printf ("len = %d\n", len);
}
I get the following output from THINK C:
diff = 0
len = 4
but the following from my SUN:
diff = 4
len = 4
Take another example - a restatement of K&R's book (page 98):
mystrlen (s)
char *s;
{
char *p = s;
while (*p != '\0')
p++;
printf ("%d\n", p-s);
return (p-s);
}
char line[] = "hello";
main()
{
printf ("length of line: %d\n", mystrlen(line));
}
Output from THINK C:
0
length of line: 5
Output from UNIX:
5
length of line: 5
Has anyone encountered this problem? Is there a patch beyond 5.0.2?
Mail: Nick Nei, Computing Science Dept.,
Glasgow Univ., 17 Lilybank Gardens,
Glasgow G12 8QQ, UK. Tel: (041) 339 8855 x 5457
ARPA: inei%uk.ac.glasgow.dcs@nsfnet-relay.ac.uk USENET: inei@cs.glasgow.uucp
Path: ucivax!gateway
From: inei@dcs.gla.ac.uk (inei)
Subject: PBUnmountVol and UnmountVol problem...
Message-ID: <9208271643.AA27539@hawaii.dcs.gla.ac.uk>
Newsgroups: fa.think-c
Lines: 19
Date: 28 Aug 92 08:37:56 GMT
Basically,
If I have file-sharing on,
UnmountVol ("\pvolume:", 0);
fails and returns -47. Seasoned mac users will also remember that with
file-sharing enabled, you cannot change volume names.
If I don't have file-shring on, UnmountVol() and PBUnmountVol() works
fine.
Can anyone help?
Mail: Nick Nei, Computing Science Dept.,
Glasgow Univ., 17 Lilybank Gardens,
Glasgow G12 8QQ, UK. Tel: (041) 339 8855 x 5457
ARPA: inei%uk.ac.glasgow.dcs@nsfnet-relay.ac.uk USENET: inei@cs.glasgow.uucp
Path: ucivax!gateway
From: nick@dcs.ed.ac.uk (Nick Rothwell)
Subject: Re: Pointer arithmetic evaluation bug in THINK C?
Message-ID: <9208281134.aa03996@dcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 25
Date: 28 Aug 92 11:05:44 GMT
>char line[] = "Hello";
>main()
>{
> char *cp1 = line;
> char *cp2 = &line[4];
> int len = cp2 - cp1;
>
> printf ("diff = %d\n", cp2 - cp1);
> printf ("len = %d\n", len);
>}
>
>I get the following output from THINK C:
>
>diff = 0
>len = 4
Erm, hmm, thinks...
BING! "cp2 - cp1" is a long. "len" is an int. The first printf is bogus
without a "%ld".
What prize have I won? :-)
Nick.
Path: ucivax!gateway
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Pointer arithmetic evaluation bug in THINK C?
Message-ID: <9208281445.AA00292@itl.itd.umich.edu>
Newsgroups: fa.think-c
Lines: 33
Date: 28 Aug 92 14:46:19 GMT
This isn't a bug. Your code is making the non-portable assumption that the
sizeof (int) == sizeof (char*)
Suppose you have:
char *cp1 = line;
char *cp2 = &line[4];
int len = cp2 - cp1;
printf ("diff = %d\n", cp2 - cp1);
printf ("len = %d\n", len);
Where:
cp1 = 0x5555AAA0
cp2 = 0x5555AAA4
len = 0x5555 - 0x5555
I'm willing to bet that this is the problem.
The workaround: either use the long type to do your pointer arithmetic,
or set the option int = 4 bytes in THINK C, and rebuild the libraries
(you will have to rebuild the ANSI library).
I am willing to bet this might be the problem. In the second case, the
problem might be that you are using the %d specifier to print a long value,
when it expects an int; in UNIX they are generally the same. Give this a
shot (and let me know if I'm totally off base).
-Paul Potts-
potts@itl.itd.umich.edu
Path: ucivax!gateway
From: nagel@cigna.uucp ("Mark D. Nagel")
Subject: ADMIN: problems with new ftp daemon on ftp.ics.uci.edu
Message-ID: <25613.715013504@cigna.com>
Newsgroups: fa.think-c
Reply-To: think-c-request@ics.uci.edu
Organization: CIGNA FIRST, Irvine, CA
Lines: 9
Date: 28 Aug 92 15:34:11 GMT
Phone: (714) 727-4242
Apparently there have been a number of people having troubles
getting through to the archives on ftp.ics.uci.edu. The new daemon
they installed there seems to be timing out when attempting to do a
reverse name lookup for the connecting host. I've spoken with the
support staff there and they are attempting to find a solution. If
you are having problems, please be patient; I'll stay on top of it
until they find some way of making it work properly...
Mark
Path: ucivax!gateway
From: C2MXBAR@fre.towson.edu (aaron barnett)
Subject: #include<QDOffScreen.h>
Message-ID: <01GO48FM12GI935MP8@TOE.TOWSON.EDU>
Content-transfer-encoding: 7BIT
MIME-version: 1.0
Newsgroups: fa.think-c
X-VMS-To: TOE::IN%"think-c@ics.uci.edu"
Lines: 1
Date: 28 Aug 92 17:55:17 GMT
X-Envelope-to: think-c@ics.uci.edu
where do i find documentation on this and other non-standard libs?
Path: ucivax!gateway
From: williamssp@gtewd.mtv.gsc.gte.com (Steve Williams)
Subject: RE: Pointer arithmetic bug in THINK C?
Message-ID: <0095FC49.39770000.3959@GTEWD>
Newsgroups: fa.think-c
Reply-To: williamssp@gtewd.mtv.gsc.gte.com
Lines: 106
Date: 28 Aug 92 17:58:22 GMT
Nick Nei asked inei@dcs.gla.ac.uk
>>> Given the following program:
>>>
>>> char line[] = "Hello";
>>> main()
>>> {
>>> char *cp1 = line;
>>> char *cp2 = &line[4];
>>> int len = cp2 - cp1;
>>>
>>> printf ("diff = %d\n", cp2 - cp1);
>>> printf ("len = %d\n", len);
>>> }
>>>
>>> I get the following output from THINK C:
>>>
>>> diff = 0
>>> len = 4
>>>
>>> but the following from my SUN:
>>>
>>> diff = 4
>>> len = 4
>>>
>>> Has anyone encountered this problem? Is there a patch beyond 5.0.2?
Nick Rothwell <nick@dcs.ed.ac.uk> responds:
>> BING! "cp2 - cp1" is a long. "len" is an int. The first printf is bogus
>> without a "%ld".
>>
>> What prize have I won? :-)
Paul Potts <potts@itl.itd.umich.edu> adds:
> This isn't a bug. Your code is making the non-portable assumption that the
> sizeof (int) == sizeof (char*)
Neither of these two explanations is entirely correct in an ANSI C compiler,
although Nick Rothwell has pointed out what happened in THINK C. Paul's answer
is misleading, because what matters is not whether sizeof(int) ==
sizeof(char*), but rather what variable type is required to hold a difference
of two pointers (which could be different than that required to hold an int or
a pointer).
In ANSI C, the difference between to pointers (i.e., the value of (cp2 - cp1)
in the first example) is defined to have type 'ptrdiff_t', which is basically
like 'size_t', except that it must be signed. The difference between two
pointers is *ALWAYS* the number of elements between the objects (which is why
you cannot take the difference of two 'void *' pointers, and also why it is
illegal to subtract two pointers to different types).
int main (int argc, char * argv)
{
float array[10];
float * fp1 = &array[0];
float * fp2 = &array[1];
char * cp1 = &array[0];
char * cp2 = &array[1];
printf ("%ld\n", (long) (fp2 - fp1)); // will print '1'
printf ("%ld\n", (long) (cp2 - cp1)); // should print sizeof(float) usually 4
printf ("%ld\n", (long) (cp2 - fp1)); // illegal, should not compile
}
The trouble is that after having gone to all the trouble to define that pointer
differences are of type ptrdiff_t, the ansi standard does not require that
ptrdiff_t be the same as long, nor did they define a printf format specifier
for printing a ptrdiff_t or a size_t.
THINK C is an ANSI compliant compiler (finally) but it uses 16-bit 'int'
variables by default. 'size_t' is 'unsigned long' and 'ptrdiff_t' is 'long'
no matter how the "4-byte ints" compiler option is set. Basically Nick Nei's
original code gets viewed by the compiler as:
char line[] = "Hello";
main()
{
char * cp1 = line;
char * cp2 = &line[4];
int len = cp2 - cp1;
ptrdiff_t dummy1 = cp2 - cp1;
printf ("diff = %d\n", dummy1);
printf ("len = %d\n", len);
}
And since ptrdiff_t is the same as long, you can see that the %d format
specifier needs to be %ld (Nick Rothwell wins that prize). The zero that THINK
C prints is really the high 16-bits of the 32-bit word. Your SUN probably
still does not have an ANSI C compiler, and like most UNIX C compilers, makes
the assumption that 'int' is the same as 'long', so you can get away with
writing some amazingly unportable C. UNIX C code is peppered with things like:
long num_of_things;
printf ("There are %d things\n", num_of_things);
This kind of code breaks on almost any machine where sizeof(int) !=
sizeof(long). Worse things happen with pointers, because most UNIX C compilers
let you get away with the assumption that sizeof(int) == sizeof(void*).
Hope this explanation helps:
Steve Williams
Path: ucivax!gateway
From: SCHENKL@vax.cs.hscsyr.edu
Subject: SFGetDirectory on FKEY
Message-ID: <920828155347.208020c4@vax.cs.hscsyr.edu>
Newsgroups: fa.think-c
Lines: 3
Date: 28 Aug 92 19:56:55 GMT
X-Vmsmail-To: SMTP%"think-c@ics.uci.edu"
I tried to use a standard file box to get a directory in an FKEY and it
bombed on me... any ideas why? (ie: I'm hoping it's buggy code...)
Path: ucivax!gateway
From: vthrc@mailbox.uq.oz.au (Danny Thomas)
Subject: RE: Pointer arithmetic bug in THINK C?
Message-ID: <9208281512.aa04405@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 39
Date: 28 Aug 92 22:12:54 GMT
two points:
I wish more compilers would verify format strings against the variable
argument list in printf/scanf functions, both in number and type. This
should work well since the vast majority of format strings are (I imagine)
literal constants.
My preference would be for not enough arguments to rate as a fatal error,
but type-mismatches or too many arguments to only generate a warning.
Problems with printf are normally easier to track down because the result
is usually only too visible, but scanf problems can be more subtle - hands
up those who have forgotten to pass addresses instead of values!
Coincidentally, I'm just finishing up a repackaging of sprintf() and
sscanf() functionality for the visual, dataflow language Prograph. These
versions will perform type and arity checking for their inputs, and their
outputs (including the %n conversion in printf) will generate data values
of the specified type - being dataflow, you don't have variables to store
values in.
As Steve Williams notes, it is disappointing that ANSI did not define
format conversion operators for the types they invented for portability -
ptrdiff_t, size_t. One kludgy workaround makes use of literal string
concatenation:
#ifdef VAX
#define PTRDIFF_T_CONV "d"
#else
#ifdef MAC
#define PTRDIFF_T_CONV "ld"
#endif
#endif
...
diff = p1 - p2;
printf("pointer difference = %6" PTRDIFF_T_CONV, diff);
...
cheers,
Path: ucivax!gateway
From: CHERRY%howard@msscc.med.utah.edu
Subject: Re: Pointer arithmetic bug in THINK C?
Message-ID: <036518C1409F001D02@msscc.med.utah.edu>
Newsgroups: fa.think-c
X-VMS-To: MSSCC::IN%"think-c@ics.uci.edu"
Lines: 47
Date: 29 Aug 92 02:44:19 GMT
X-Envelope-to: think-c@ics.uci.edu
Danny Thomas <vthrc@mailbox.uq.oz.au> writes:
>two points:
>I wish more compilers would verify format strings against the variable
>argument list in printf/scanf functions, both in number and type. This
>should work well since the vast majority of format strings are (I imagine)
>literal constants.
The compiler doesn't know anything about printf/scanf (other than what is
in the #include'd prototypes). To make it know would be a departure from
the general philosophy of c ("so what" you may say). I think it would even
be a violation of the standard; I should be able to name my own function
'printf', see that it gets linked to my code, and pass it anything I want to.
>As Steve Williams notes, it is disappointing that ANSI did not define
>format conversion operators for the types they invented for portability -
>ptrdiff_t, size_t. One kludgy workaround makes use of literal string
>concatenation:
>
>#ifdef VAX
>#define PTRDIFF_T_CONV "d"
>#else
>#ifdef MAC
>#define PTRDIFF_T_CONV "ld"
>#endif
>#endif
>
>...
> diff = p1 - p2;
> printf("pointer difference = %6" PTRDIFF_T_CONV, diff);
>...
You don't need to do anything so kludgy. Just typecast the variable
whose value is being printed, e.g.:
...
diff = p1 - p2;
printf("pointer difference = %d", (int) diff);
...
which should work on any machine (unless, obviosly, the difference is so large
that it can't fit into an int). You could also use %ld and typecast
to long.
-Josh Cherry
Path: ucivax!gateway
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: RE: Pointer arithmetic bug in THINK C?
Message-ID: <9208311234.AA02171@itl.itd.umich.edu>
Newsgroups: fa.think-c
Lines: 17
Date: 31 Aug 92 12:36:06 GMT
Gentle readers
Terribly sorry to have "misled" anyone
(Steve Williams <williamssp@gtewd.mtv.gsc.gte.com> writes:
>> Paul's answer
is misleading, because what matters is not whether sizeof(int) ==
sizeof(char*), but rather what variable type is required to hold a difference
of two pointers (which could be different than that required to hold an int or
a pointer).
For those of you that I "misled," I apologize (dripping sarcasm). For the
rest of you bright enough not to need Professor William's agonizingly
detailed explanation of pointers, the differences between them, and the
types thereof, I hope I was of some help.
Path: ucivax!gateway
From: walshag@hermes.bc.edu (WALSHAG)
Subject: Pixel-editor & 'ppat' resources
Message-ID: <9208310737.aa04289@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 8
Date: 31 Aug 92 14:37:28 GMT
For the record, I was unable to find the source to an existing pixel editor.
Instead I wrote a utility which allows the user to "snap" a section of the
screen. This section is converted to my own pixMap, which I then use in the
creation of a pixPat (which is the structure stored in a 'ppat' resource).
All is well and good until I try to save my pixPat to disk with AddResource().
At this point, the resource becomes corrupted & is unreadable.
Path: ucivax!gateway
From: walshag@hermes.bc.edu (WALSHAG)
Subject: Pixel editor & ppat con't
Message-ID: <9208310752.aa05210@q2.ics.uci.edu>
Newsgroups: fa.think-c
Lines: 23
Date: 31 Aug 92 14:52:31 GMT
[Sorry for the break in messages. My habit of command-s to save periodically
while working backfires in MS-Mail:command-s in MS-Mail is send, not save]
At any rate....
The 'ppat' I have saved to disk is now corrupted. I have tried several things
to remedy this. I also tried saving it to a resource other than 'ppat', just
in case something was awry with the 'ppat' data structure. No luck.
I am no stranger to saving custom resources, so this should be straight forward
& simple. An easy test to see what I am talking about is to read in an
existing 'ppat' using either GetResource() or GetPixPat() and then try to save
it out as a new one using DetachResource(), AddResource() & WriteResource().
This approach works fine unless you *change* the pixPat now in memory. Once
you try to save out the changed resource, it is once again corrupted.
Incredibly frustrating, as this project would be done if I could just save my
pixPat to disk!
Any ideas?
Aaron Walsh
walshag@bcvms.bc.edu
Path: ucivax!gateway
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Pointer arithmetic evaluation bug in THINK C?
Message-ID: <9208311558.AA02384@itl.itd.umich.edu>
Newsgroups: fa.think-c
Lines: 109
Date: 31 Aug 92 16:00:03 GMT
All right. For clarity's sake, here are the reasons I am angry:
I originally wrote:
>This isn't a bug. Your code is making the non-portable assumption that the
sizeof (int) == sizeof (char*)
Steve Williams wrote:
>Paul's answer
>is misleading, because what matters is not whether sizeof(int) ==
>sizeof(char*), but rather what variable type is required to hold a difference
>of two pointers (which could be different than that required to hold an
>int or a pointer).
It is potentially unsafe to cast the difference between two pointers
to an int. ANSI can take care of itself with ptrdiff_t, but it can't
guard against the assumption made in the first example that the
difference between the pointers (of type ptrdiff_t) will fit into
an int. ptrdiff_t must be potentially as large as a generic
pointer (although, of course, in the first case the difference
will only be a few bytes). The size of ptrdiff_t is tied to the
size of a generic pointer. I can conceive of machine architectures
in which they aren't the same - but on a machine like the Mac,
they must be.
However, what do we see down near the end of Steve William's long
posting?
>Your SUN probably
>still does not have an ANSI C compiler, and like most UNIX C compilers, makes
>the assumption that 'int' is the same as 'long', so you can get away with
>writing some amazingly unportable C.....
>
>Worse things happen with pointers, because most UNIX C compilers
>let you get away with the assumption that sizeof(int) == sizeof(void*).
On the Mac, Pointers are all the same size. sizeof (void*) is
the same as sizeof (char*), so my original statement applies here.
Surprise! In addition, Williams' explanation that
"The difference between two pointers is *ALWAYS* the number of
elements between the objects (which is why you cannot take the
difference of two 'void *' pointers, and also why it is
illegal to subtract two pointers to different types)." is correct,
but needless - in THINK C, the char type is one byte, and so
the difference between ten chars in memory is the same as the
difference between two generic pointers that point to memory
ten bytes apart (although one can't take the difference between
pointers to void).
I also wrote:
>In the second case, the
>problem might be that you are using the %d specifier to print a long value,
>when it expects an int; in UNIX they are generally the same. Give this a
>shot (and let me know if I'm totally off base).
Williams was enjoying jumping on my initial response so much, that
he didn't notice this portion of my posting. He added:
>And since ptrdiff_t is the same as long, you can see that the %d format
>specifier needs to be %ld (Nick Rothwell wins that prize). The zero that >THINK C prints is really the high 16-bits of the 32-bit word.
Thus, I supplied two
comments which turned out to be somewhat applicable according to
Williams' own posting: one is ignored, and regarding the other,
I am just told "Paul's answer is misleading."
One-upmanship at work; sheer pedantry. Williams is too busy handing
out prizes to consider that this is an open discussion, and the
purpose of my posting was to try to provide a couple of useful
suggestions, not trumpet my knowledge of the innards of C.
I also received correction from Bradford Castalia, which I will
accept because it was graciously done. Bradford writes:
>I'll take you up on your bet! I think you're wrong that in your example
>you would have:
>
> len = 0x5555 - 0x5555
>
>In fact the C language guarantees that the pointer subtraction will
>give a correct result (I've checked K&R on this).
And he is right: I was incorrect about the way the conversion would
take place, maintaining the low-order bits. However, Bradford also
wrote:
>You are right about the %d specifier to printf...
I suspected a possible problem here, because I have had problems
with printf myself, especially when I was just starting out with
C. For my IBM-compatible programming work I now use C++, and I'm
happily using streams, which are type-safe and go much further
to protect the programmer against possible pitfalls like the
long-to-int conversion.
Bradford continues:
>You lose the bet, but you guessed right in the end. We'll call it a
>wash ;-)
Bradford Castalia castalia@pirl.lpl.arizona.edu
Thanks.
I hope this helps explain why I was somewhat irate in my posting
earlier today. Please, everyone. This forum is not a competition!
We are here to help one another. I will also try to be less
sensitive in the future.
Path: ucivax!gateway
From: rc05@gte.com (Ramesh Chandak)
Subject: Appmaker and THINK C question ?
Message-ID: <9208312229.AA23881@bunny.gte.com>
Newsgroups: fa.think-c
Lines: 11
Date: 31 Aug 92 22:30:04 GMT
HI folks,
I have a question about how to Import PICT resources into Appmaker and
define them as part of a tool palette that I wish to create for this
application. Is there any way I can do this using AppMaker or do I
have to write my own C code to do it ?
Is there any public domain source code available that will help me do this ?
Any help in this regard shall be much appreciated. Thanx.
- Ramesh